bc: make bc_vm_envArgs() NULL-terminate its argv, simplify bc_vm_envLen()
authorDenys Vlasenko <vda.linux@googlemail.com>
Wed, 5 Dec 2018 23:46:09 +0000 (00:46 +0100)
committerDenys Vlasenko <vda.linux@googlemail.com>
Wed, 5 Dec 2018 23:54:12 +0000 (00:54 +0100)
commit1ff1c7094403fa96acce46611e7bf9534f2d8404
tree8e561d89247628eaa0f0f19a2f3d460a2847c884
parente873ff9660a2f02a4b2647b74212e74649726e7d
bc: make bc_vm_envArgs() NULL-terminate its argv, simplify bc_vm_envLen()

function                                             old     new   delta
bc_num_ulong                                          92     103     +11
static.nullptr                                         -       4      +4
bc_args                                              120     123      +3
static.bc_args_env_name                                4       -      -4
dc_main                                               49      41      -8
bc_main                                               49      41      -8
bc_vm_run                                           1917    1883     -34
------------------------------------------------------------------------------
(add/remove: 1/1 grow/shrink: 2/3 up/down: 18/-54)            Total: -36 bytes

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
miscutils/bc.c