From b68979aefa0efb519e6af02deba082e6b4180043 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Fri, 2 Nov 2007 23:31:10 +0000 Subject: 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 --- libbb/xreadlink.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libbb') 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); -- cgit v1.2.3