Mercurial > hg > toybox
diff lib/args.c @ 624:1e8b9acdafeb
Genericize llist code a bit: rename llist_free() to llist_traverse(), and no longer accept NULL as a synonym for free.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sun, 15 Jul 2012 17:22:04 -0500 |
parents | c2f39708a4c4 |
children | 4d9fa8b8a300 |
line wrap: on
line diff
--- a/lib/args.c Sun Jul 15 16:56:20 2012 -0500 +++ b/lib/args.c Sun Jul 15 17:22:04 2012 -0500 @@ -413,4 +413,9 @@ if (toys.optc>gof.maxargs) error_exit("Max %d argument%s", gof.maxargs, letters[!(gof.maxargs-1)]); if (CFG_HELP) toys.exithelp = 0; + + if (CFG_TOYBOX_FREE) { + llist_traverse(gof.opts, free); + llist_traverse(gof.longopts, free); + } }