summaryrefslogtreecommitdiffstats
path: root/htop.c
diff options
context:
space:
mode:
authorMichael McConville <mmcconville ~a~ mykolab ~d~ com>2015-09-19 12:15:26 -0400
committerMichael McConville <mmcconville ~a~ mykolab ~d~ com>2015-09-19 12:15:26 -0400
commit571cbc0aa1138891f2233db681531d132b31b88f (patch)
treebc126132afb3500afe578aa8d6c374254d6d68a7 /htop.c
parente2bbd5cfa45e02c00ba932e2cd519382b203157a (diff)
Change more fprintf(stderr, ...); exit(...); to err[x](...). Tweak a few existing ones and fix some style.
Diffstat (limited to 'htop.c')
-rw-r--r--htop.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/htop.c b/htop.c
index 32c0c510..538d1094 100644
--- a/htop.c
+++ b/htop.c
@@ -132,11 +132,11 @@ static CommandLineSettings parseArguments(int argc, char** argv) {
char* saveptr;
char* pid = strtok_r(argCopy, ",", &saveptr);
- if( !flags.pidWhiteList ) {
+ if(!flags.pidWhiteList) {
flags.pidWhiteList = Hashtable_new(8, false);
}
- while( pid ) {
+ while(pid) {
unsigned int num_pid = atoi(pid);
Hashtable_put(flags.pidWhiteList, num_pid, (void *) 1);
pid = strtok_r(NULL, ",", &saveptr);
@@ -176,8 +176,7 @@ int main(int argc, char** argv) {
#ifdef HAVE_PROC
if (access(PROCDIR, R_OK) != 0) {
- fprintf(stderr, "Error: could not read procfs (compiled to look in %s).\n", PROCDIR);
- exit(1);
+ errx(1, "Error: could not read procfs (compiled to look in %s).\n", PROCDIR);
}
#endif

© 2014-2024 Faster IT GmbH | imprint | privacy policy