projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0db2c2e
)
nmeter: tiny shrink
author
Denis Vlasenko
<vda.linux@googlemail.com>
Mon, 30 Jun 2008 07:33:52 +0000
(07:33 -0000)
committer
Denis Vlasenko
<vda.linux@googlemail.com>
Mon, 30 Jun 2008 07:33:52 +0000
(07:33 -0000)
procps/nmeter.c
patch
|
blob
|
history
diff --git
a/procps/nmeter.c
b/procps/nmeter.c
index 96d0bb9518eae78ee6563eb520ab69e4143d40aa..205cb8251760946c55c5ef755907a4f2f2a7e264 100644
(file)
--- a/
procps/nmeter.c
+++ b/
procps/nmeter.c
@@
-132,11
+132,10
@@
static void readfile_z(char *buf, int sz, const char* fname)
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)