From 048ae3483e3ed87f390d42e420c021e6b2fe85fe Mon Sep 17 00:00:00 2001 From: landley Date: Mon, 8 May 2006 19:03:07 +0000 Subject: 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. git-svn-id: svn://busybox.net/trunk/busybox@15037 69ca8d6d-28ef-0310-b511-8ec308f3f277 --- procps/pidof.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'procps') 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; } -- cgit v1.2.3-55-g6feb