svn commit: trunk/busybox/procps
vda at busybox.net
vda at busybox.net
Mon Jun 30 07:33:53 UTC 2008
Author: vda
Date: 2008-06-30 00:33:52 -0700 (Mon, 30 Jun 2008)
New Revision: 22562
Log:
nmeter: tiny shrink
Modified:
trunk/busybox/procps/nmeter.c
Changeset:
Modified: trunk/busybox/procps/nmeter.c
===================================================================
--- trunk/busybox/procps/nmeter.c 2008-06-29 06:22:40 UTC (rev 22561)
+++ trunk/busybox/procps/nmeter.c 2008-06-30 07:33:52 UTC (rev 22562)
@@ -132,11 +132,10 @@
int fd = xopen(fname, O_RDONLY);
buf[0] = '\0';
- if (fd >= 0) {
- sz = read(fd, buf, sz-1);
- if (sz > 0) buf[sz] = '\0';
- close(fd);
- }
+ sz = read(fd, buf, sz - 1);
+ if (sz > 0)
+ buf[sz] = '\0';
+ close(fd);
}
static const char* get_file(proc_file *pf)
More information about the busybox-cvs
mailing list