summaryrefslogtreecommitdiff
path: root/vmstat.c
diff options
context:
space:
mode:
authorQualys Security Advisory <qsa@qualys.com>1970-01-01 00:00:00 +0000
committerCraig Small <csmall@enc.com.au>2018-06-23 21:59:14 +1000
commite37e4528d0f621b0d82e84e10a778200255cfbb9 (patch)
tree71ca13e8a6f2b8df4d5ab4dba3fc810f897fc3af /vmstat.c
parenteaec2d09771923aae5198e5631764f9f5e59752b (diff)
downloadprocps-ng-e37e4528d0f621b0d82e84e10a778200255cfbb9.tar.gz
0122-vmstat: getopt*() returns -1 when done, not EOF.
Luckily, EOF is usually -1, but this is not guaranteed by the standard. Signed-off-by: Craig Small <csmall@enc.com.au>
Diffstat (limited to 'vmstat.c')
-rw-r--r--vmstat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vmstat.c b/vmstat.c
index 802f3ee..9c82c08 100644
--- a/vmstat.c
+++ b/vmstat.c
@@ -910,7 +910,7 @@ int main(int argc, char *argv[])
atexit(close_stdout);
while ((c =
- getopt_long(argc, argv, "afmnsdDp:S:wthV", longopts, NULL)) != EOF)
+ getopt_long(argc, argv, "afmnsdDp:S:wthV", longopts, NULL)) != -1)
switch (c) {
case 'V':
printf(PROCPS_NG_VERSION);