commit | bc2fd372272e4917909358473c07e19c1ce450cc | [log] [tgz] |
---|---|---|
author | Denis Vlasenko <vda.linux@googlemail.com> | Mon Jun 30 07:33:52 2008 +0000 |
committer | Denis Vlasenko <vda.linux@googlemail.com> | Mon Jun 30 07:33:52 2008 +0000 |
tree | e1d7d7b377a56aaafcb0c4a7dc661a86e2ff2a06 | |
parent | 0db2c2eb7123385b9fe035b9ce6ee398b592abf8 [diff] |
nmeter: tiny shrink
diff --git a/procps/nmeter.c b/procps/nmeter.c index 96d0bb9..205cb82 100644 --- a/procps/nmeter.c +++ b/procps/nmeter.c
@@ -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)