← Commit list

bc2fd3722

Denis Vlasenko
Denis Vlasenko
2008-06-30
FAILED Duration: 24s

Subject

nmeter: tiny shrink

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

procps/nmeter.c+4 -5
@@ -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)