summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDenis Vlasenko2007-06-04 10:16:52 +0000
committerDenis Vlasenko2007-06-04 10:16:52 +0000
commit74324c86663f57a19c1de303ee8c8e5449db9ef2 (patch)
tree11f5da9de4212875ce5811be2e1050e076378c9a /include
parent4e5f82c76f08614d0b69f9ec4a8baac303af15f6 (diff)
downloadbusybox-74324c86663f57a19c1de303ee8c8e5449db9ef2.zip
busybox-74324c86663f57a19c1de303ee8c8e5449db9ef2.tar.gz
Audit bb_common_bufsiz usage, add script which looks for misuse.
tr: stop using globals needlessly. code: -103 bytes
Diffstat (limited to 'include')
-rw-r--r--include/libbb.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/libbb.h b/include/libbb.h
index 385b30f..0136337 100644
--- a/include/libbb.h
+++ b/include/libbb.h
@@ -954,7 +954,8 @@ extern const int const_int_1;
#define BUFSIZ 4096
#endif
/* Providing hard guarantee on minimum size (think of BUFSIZ == 128) */
-extern char bb_common_bufsiz1[(BUFSIZ > 256*sizeof(void*) ? BUFSIZ : 256*sizeof(void*)) + 1];
+enum { COMMON_BUFSIZE = (BUFSIZ >= 256*sizeof(void*) ? BUFSIZ+1 : 256*sizeof(void*)) };
+extern char bb_common_bufsiz1[COMMON_BUFSIZE];
/* This struct is deliberately not defined. */
/* See docs/keep_data_small.txt */
struct globals;