summaryrefslogtreecommitdiff
path: root/coreutils/catv.c
diff options
context:
space:
mode:
authorDenis Vlasenko2007-06-04 10:16:52 +0000
committerDenis Vlasenko2007-06-04 10:16:52 +0000
commit74324c86663f57a19c1de303ee8c8e5449db9ef2 (patch)
tree11f5da9de4212875ce5811be2e1050e076378c9a /coreutils/catv.c
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 'coreutils/catv.c')
-rw-r--r--coreutils/catv.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/coreutils/catv.c b/coreutils/catv.c
index 2d2229f..cc61233 100644
--- a/coreutils/catv.c
+++ b/coreutils/catv.c
@@ -33,13 +33,14 @@ int catv_main(int argc, char **argv)
else for (;;) {
int i, res;
- res = read(fd, bb_common_bufsiz1, sizeof(bb_common_bufsiz1));
+#define read_buf bb_common_bufsiz1
+ res = read(fd, read_buf, COMMON_BUFSIZE);
if (res < 0)
retval = EXIT_FAILURE;
if (res < 1)
break;
for (i = 0; i < res; i++) {
- char c = bb_common_bufsiz1[i];
+ char c = read_buf[i];
if (c > 126 && (flags & CATV_OPT_v)) {
if (c == 127) {