aboutsummaryrefslogtreecommitdiff
path: root/libbb
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-11-02 23:31:10 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-11-02 23:31:10 +0000
commitb68979aefa0efb519e6af02deba082e6b4180043 (patch)
treeb16d64f31b629e54c70d30abbd98f3b4f46d7cd4 /libbb
parent9d1afdb571e0ba3053616d74edc99a68325ef5e9 (diff)
downloadbusybox-b68979aefa0efb519e6af02deba082e6b4180043.tar.gz
insmod: code shrink, stop exporting insmod_ng_main.
function old new delta add_ksymoops_symbols - 421 +421 static.section_names 20 40 +20 lsmod_main 425 424 -1 set_tainted 153 150 -3 main_opts 4 - -4 obj_symbol_patch 47 42 -5 obj_string_patch 144 139 -5 already_loaded 144 138 -6 check_dep 348 341 -7 append_option 75 68 -7 obj_allocate_commons 515 501 -14 new_process_module_arguments 1039 1018 -21 arch_new_symbol 31 9 -22 check_module_name_match 85 61 -24 obj_create_alloced_section 164 136 -28 include_conf 930 902 -28 modprobe_main 1643 1535 -108 obj_load 924 777 -147 insmod_ng_main 245 - -245 insmod_main 4122 3794 -328 ------------------------------------------------------------------------------ (add/remove: 1/2 grow/shrink: 1/16 up/down: 441/-1003) Total: -562 bytes text data bss dec hex filename 776020 974 9420 786414 bffee busybox_old 775384 974 9420 785778 bfd72 busybox_unstripped
Diffstat (limited to 'libbb')
-rw-r--r--libbb/xreadlink.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libbb/xreadlink.c b/libbb/xreadlink.c
index 4d87b944d..98b795f56 100644
--- a/libbb/xreadlink.c
+++ b/libbb/xreadlink.c
@@ -18,7 +18,8 @@ char *xmalloc_readlink(const char *path)
int bufsize = 0, readsize = 0;
do {
- buf = xrealloc(buf, bufsize += GROWBY);
+ bufsize += GROWBY;
+ buf = xrealloc(buf, bufsize);
readsize = readlink(path, buf, bufsize);
if (readsize == -1) {
free(buf);