aboutsummaryrefslogtreecommitdiff
path: root/procps
diff options
context:
space:
mode:
authorGravatar Rob Landley <rob@landley.net>2006-05-08 19:03:07 +0000
committerGravatar Rob Landley <rob@landley.net>2006-05-08 19:03:07 +0000
commita6b5b60942b4e28965f10cb107d4f94aaf756bc1 (patch)
treee97daaa61ca25179f9cfd9251446d00521bb5ddb /procps
parent712ba85b30426bc8fa093c21ae9a5d0018450cc7 (diff)
downloadbusybox-a6b5b60942b4e28965f10cb107d4f94aaf756bc1.tar.gz
busybox-a6b5b60942b4e28965f10cb107d4f94aaf756bc1.tar.bz2
Fiddling with llist to make memory management easier. Specifically, the
option to delete the contents of the list when we delete the list is a good thing.
Diffstat (limited to 'procps')
-rw-r--r--procps/pidof.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/procps/pidof.c b/procps/pidof.c
index 5b3e53fdf..98008aaf1 100644
--- a/procps/pidof.c
+++ b/procps/pidof.c
@@ -65,7 +65,7 @@ int pidof_main(int argc, char **argv)
while (omits_p) {
/* are we asked to exclude the parent's process ID? */
if (!strncmp(omits_p->data, "%PPID", 5)) {
- omits_p = llist_free_one(omits_p);
+ llist_pop(&omits_p);
snprintf(getppid_str, sizeof(getppid_str), "%d", getppid());
omits_p = llist_add_to(omits_p, getppid_str);
#if 0
@@ -117,7 +117,7 @@ int pidof_main(int argc, char **argv)
#if ENABLE_FEATURE_PIDOF_OMIT
if (ENABLE_FEATURE_CLEAN_UP)
- llist_free(omits);
+ llist_free(omits, NULL);
#endif
return fail ? EXIT_FAILURE : EXIT_SUCCESS;
}