getopt32: move support for "always treat first arg as option" to users (tar/ar)
authorDenys Vlasenko <vda.linux@googlemail.com>
Fri, 4 Aug 2017 14:46:17 +0000 (16:46 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Fri, 4 Aug 2017 14:46:17 +0000 (16:46 +0200)
commitdd5a40246b91bd5d3d165998e6ac3cc4f7083f63
treeffbd1f118040b36ae23f43d491bd8de097fd0843
parent727948e585cb133c32c8d42570e5524c58190307
getopt32: move support for "always treat first arg as option" to users (tar/ar)

Now getopt() never leaks (and never performs) any xmalloc's.

function                                             old     new   delta
ar_main                                              522     556     +34
tar_main                                             986    1014     +28
getopt32                                            1458    1350    -108
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 2/1 up/down: 62/-108)           Total: -46 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
archival/ar.c
archival/tar.c
libbb/getopt32.c