mirror of
https://github.com/sheumann/hush.git
synced 2024-09-12 00:55:11 +00:00
nmeter: tiny shrink
This commit is contained in:
parent
0db2c2eb71
commit
bc2fd37227
@ -132,11 +132,10 @@ static void readfile_z(char *buf, int sz, const char* fname)
|
|||||||
|
|
||||||
int fd = xopen(fname, O_RDONLY);
|
int fd = xopen(fname, O_RDONLY);
|
||||||
buf[0] = '\0';
|
buf[0] = '\0';
|
||||||
if (fd >= 0) {
|
sz = read(fd, buf, sz - 1);
|
||||||
sz = read(fd, buf, sz-1);
|
if (sz > 0)
|
||||||
if (sz > 0) buf[sz] = '\0';
|
buf[sz] = '\0';
|
||||||
close(fd);
|
close(fd);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char* get_file(proc_file *pf)
|
static const char* get_file(proc_file *pf)
|
||||||
|
Loading…
Reference in New Issue
Block a user