[hackers] [sbase] getconf: Ensure output was written successfully || Michael Forney
commit b524eb6f3d03536ef6b091b436692292e5c59da9
Author: Michael Forney <mforney_AT_mforney.org>
AuthorDate: Sun Sep 3 17:26:04 2017 -0700
Commit: Michael Forney <mforney_AT_mforney.org>
CommitDate: Sun Sep 3 17:26:04 2017 -0700
getconf: Ensure output was written successfully
diff --git a/getconf.c b/getconf.c
index c7cfb06..fdebc58 100644
--- a/getconf.c
+++ b/getconf.c
_AT_@ -51,7 +51,7 @@ main(int argc, char *argv[])
} else {
printf("%ld\n", res);
}
- return 0;
+ return fshut(stdout, "<stdout>");
}
/* confstr */
for (i = 0; i < LEN(confstr_l); i++) {
_AT_@ -74,14 +74,14 @@ main(int argc, char *argv[])
}
free(str);
}
- return 0;
+ return fshut(stdout, "<stdout>");
}
/* limits */
for (i = 0; i < LEN(limits_l); i++) {
if (strcmp(argv[0], limits_l[i].k))
continue;
printf("%ld\n", limits_l[i].v);
- return 0;
+ return fshut(stdout, "<stdout>");
}
} else if (argc == 2) {
/* pathconf */
_AT_@ -96,7 +96,7 @@ main(int argc, char *argv[])
} else {
printf("%ld\n", res);
}
- return 0;
+ return fshut(stdout, "<stdout>");
}
} else {
usage();
Received on Mon Sep 04 2017 - 02:46:20 CEST
This archive was generated by hypermail 2.3.0
: Mon Sep 04 2017 - 02:48:41 CEST