aboutsummaryrefslogtreecommitdiff
path: root/toys/other
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2018-03-21 14:06:02 -0500
committerRob Landley <rob@landley.net>2018-03-21 14:06:02 -0500
commit0068c53f7e134c455785df7b0547f553d6eb80dd (patch)
tree056924dd1e50e9a0f70a287ca5f2bcc6b35ce4f5 /toys/other
parent133915d49405693b587c3e67fc56c186543ae210 (diff)
downloadtoybox-0068c53f7e134c455785df7b0547f553d6eb80dd.tar.gz
Collate two error messages that both mean "your kernel is broken".
Diffstat (limited to 'toys/other')
-rw-r--r--toys/other/vmstat.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/toys/other/vmstat.c b/toys/other/vmstat.c
index a16afe65..4aa2144b 100644
--- a/toys/other/vmstat.c
+++ b/toys/other/vmstat.c
@@ -64,12 +64,9 @@ static void get_vmstat_proc(struct vmstat_proc *vmstat_proc)
file = xreadfile(name = vmstuff[i], 0, 0);
continue;
- } else if (!(p = strafter(file, vmstuff[i]))) {
- error_exit("No %sin %s", vmstuff[i], name);
- }
- if (1 != sscanf(p, "%"PRIu64"%n", new++, &j)) {
- error_exit("Bad %sin %s: %s", vmstuff[i], name, p);
- }
+ } else p = strafter(file, vmstuff[i]);
+ if (!p || 1!=sscanf(p, "%"PRIu64"%n", new++, &j))
+ error_exit("Bad %sin %s", vmstuff[i], name);
p += j;
}
free(file);