masqmail
diff src/conf.c @ 262:fc1c6425c024
s/EXIT_SUCCESS/0/ && s/EXIT_FAILURE/1/
The constants are all to bulky.
We should have different, meaningful exit codes anyway.
author | markus schnalke <meillo@marmaro.de> |
---|---|
date | Thu, 02 Dec 2010 17:11:25 -0300 |
parents | 82d168dd52fd |
children | e0de950ed497 |
line diff
1.1 --- a/src/conf.c Thu Dec 02 16:52:39 2010 -0300 1.2 +++ b/src/conf.c Thu Dec 02 17:11:25 2010 -0300 1.3 @@ -39,13 +39,13 @@ 1.4 conf.mail_uid = passwd->pw_uid; 1.5 else { 1.6 fprintf(stderr, "user %s not found! (terminating)\n", DEF_MAIL_USER); 1.7 - exit(EXIT_FAILURE); 1.8 + exit(1); 1.9 } 1.10 if ((group = getgrnam(DEF_MAIL_GROUP))) 1.11 conf.mail_gid = group->gr_gid; 1.12 else { 1.13 fprintf(stderr, "group %s not found! (terminating)\n", DEF_MAIL_GROUP); 1.14 - exit(EXIT_FAILURE); 1.15 + exit(1); 1.16 } 1.17 } 1.18 1.19 @@ -79,7 +79,7 @@ 1.20 } 1.21 1.22 fprintf(stderr, "cannot parse value '%s'\n", rval); 1.23 - exit(EXIT_FAILURE); 1.24 + exit(1); 1.25 } 1.26 1.27 /* make a list from each line in a file */ 1.28 @@ -91,7 +91,7 @@ 1.29 1.30 if ((fptr = fopen(fname, "rt")) == NULL) { 1.31 logwrite(LOG_ALERT, "could not open %s for reading: %s\n", fname, strerror(errno)); 1.32 - exit(EXIT_FAILURE); 1.33 + exit(1); 1.34 } 1.35 1.36 gchar buf[256]; 1.37 @@ -185,7 +185,7 @@ 1.38 #endif 1.39 } else { 1.40 logwrite(LOG_ALERT, "unknown resolver %s\n", item); 1.41 - exit(EXIT_FAILURE); 1.42 + exit(1); 1.43 } 1.44 g_free(item); 1.45 } 1.46 @@ -240,7 +240,7 @@ 1.47 1.48 if ((addr.s_addr = inet_addr(buf)) == INADDR_NONE) { 1.49 fprintf(stderr, "'%s' is not a valid address (must be ip)\n", buf); 1.50 - exit(EXIT_FAILURE); 1.51 + exit(1); 1.52 } 1.53 1.54 if (*p) { 1.55 @@ -251,7 +251,7 @@ 1.56 n = i ? ~((1 << (32 - i)) - 1) : 0; 1.57 else { 1.58 fprintf(stderr, "'%d' is not a valid net mask (must be >= 0 and <= 32)\n", i); 1.59 - exit(EXIT_FAILURE); 1.60 + exit(1); 1.61 } 1.62 } else 1.63 n = 0;