aboutsummaryrefslogtreecommitdiff
path: root/coreutils/sort.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-06-15 05:40:56 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-06-15 05:40:56 +0000
commitd50dda8c3501af9d593cd11272a15b480864a01c (patch)
tree652da97787e8e86f876b647ca9dab4b6b64fe291 /coreutils/sort.c
parent873b895d50d69a45b52bef85a8a4fb190f9c89ce (diff)
downloadbusybox-d50dda8c3501af9d593cd11272a15b480864a01c.tar.gz
*: use llist_pop for traverse-and-free list operation
function old new delta append_file_list_to_list 109 111 +2 udhcpc_main 2414 2413 -1 run_parts_main 325 324 -1 od_main 2324 2323 -1 getopt_main 709 707 -2 env_main 253 251 -2 sed_main 659 656 -3 ps_main 522 519 -3 traceroute_main 3960 3954 -6 sort_main 844 838 -6 diff_main 866 858 -8 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/10 up/down: 2/-33) Total: -31 bytes
Diffstat (limited to 'coreutils/sort.c')
-rw-r--r--coreutils/sort.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/coreutils/sort.c b/coreutils/sort.c
index 12b463a6d..1f531fb76 100644
--- a/coreutils/sort.c
+++ b/coreutils/sort.c
@@ -314,7 +314,7 @@ int sort_main(int argc ATTRIBUTE_UNUSED, char **argv)
0
};
struct sort_key *key = add_key();
- char *str_k = lst_k->data;
+ char *str_k = llist_pop(&lst_k);
const char *temp2;
i = 0; /* i==0 before comma, 1 after (-k3,6) */
@@ -344,8 +344,6 @@ int sort_main(int argc ATTRIBUTE_UNUSED, char **argv)
str_k++;
}
}
- /* leaking lst_k... */
- lst_k = lst_k->link;
}
#endif
/* global b strips leading and trailing spaces */