diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2026-02-05 13:36:27 +0100 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2026-02-05 13:36:27 +0100 |
| commit | fddd93edbdbf8c5afbfdb3c01d82e082a8a82d1a (patch) | |
| tree | bc67c4cd3acea69333eb7bb4d8d4d904d5d6027a /modutils | |
| parent | 3d572a8cc3d71b43877db2776882e91303a0532d (diff) | |
| download | busybox-w32-fddd93edbdbf8c5afbfdb3c01d82e082a8a82d1a.tar.gz busybox-w32-fddd93edbdbf8c5afbfdb3c01d82e082a8a82d1a.tar.bz2 busybox-w32-fddd93edbdbf8c5afbfdb3c01d82e082a8a82d1a.zip | |
libbb: introduce and use xasprintf_inplace()
function old new delta
xasprintf_and_free - 49 +49
watch_main 269 282 +13
singlemount 1313 1315 +2
append_mount_options 157 149 -8
ip_port_str 122 112 -10
lsblk_main 869 858 -11
add_cmd 1178 1167 -11
------------------------------------------------------------------------------
(add/remove: 1/0 grow/shrink: 2/4 up/down: 64/-40) Total: 24 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'modutils')
| -rw-r--r-- | modutils/modprobe-small.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/modutils/modprobe-small.c b/modutils/modprobe-small.c index 31a215a29..b3c0768ee 100644 --- a/modutils/modprobe-small.c +++ b/modutils/modprobe-small.c | |||
| @@ -1010,9 +1010,7 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv) | |||
| 1010 | char **arg = argv; | 1010 | char **arg = argv; |
| 1011 | while (*++arg) { | 1011 | while (*++arg) { |
| 1012 | /* Enclose options in quotes */ | 1012 | /* Enclose options in quotes */ |
| 1013 | char *s = options; | 1013 | xasprintf_inplace(options, "%s \"%s\"", options ? options : "", *arg); |
| 1014 | options = xasprintf("%s \"%s\"", s ? s : "", *arg); | ||
| 1015 | free(s); | ||
| 1016 | *arg = NULL; | 1014 | *arg = NULL; |
| 1017 | } | 1015 | } |
| 1018 | # else | 1016 | # else |
