hermes.c, approve.c: use proper EXIT_* code instead of magic contstant

This commit is contained in:
Peter Simons 2013-02-09 20:14:35 +01:00
parent 6e37fb864d
commit f693f67bf4
2 changed files with 8 additions and 8 deletions

View File

@ -101,7 +101,7 @@ void approve_main(char* mail)
if (ParseMail(&MailStruct, mail, MasterConfig->fqdn) != 0) if (ParseMail(&MailStruct, mail, MasterConfig->fqdn) != 0)
{ {
syslog(LOG_ERR, "Parsing the incoming mail failed."); syslog(LOG_ERR, "Parsing the incoming mail failed.");
exit(-1); exit(EXIT_FAILURE);
} }
if (MailStruct->From == NULL) if (MailStruct->From == NULL)
@ -133,6 +133,6 @@ void approve_main(char* mail)
else else
{ {
syslog(LOG_ERR, "Failed to send email to \"%s\" concerning his request.", originator); syslog(LOG_ERR, "Failed to send email to \"%s\" concerning his request.", originator);
exit(-1); exit(EXIT_FAILURE);
} }
} }

View File

@ -145,7 +145,7 @@ void hermes_main(char * incoming_mail, const char * listname)
else else
{ {
syslog(LOG_ERR, "Failed to send email to \"%s\" concerning this request.", owner); syslog(LOG_ERR, "Failed to send email to \"%s\" concerning this request.", owner);
exit(-1); exit(EXIT_FAILURE);
} }
return; return;
} }
@ -177,7 +177,7 @@ void hermes_main(char * incoming_mail, const char * listname)
else else
{ {
syslog(LOG_ERR, "Failed to send email to \"%s\" concerning this request.", owner); syslog(LOG_ERR, "Failed to send email to \"%s\" concerning this request.", owner);
exit(-1); exit(EXIT_FAILURE);
} }
return; return;
} }
@ -217,7 +217,7 @@ void hermes_main(char * incoming_mail, const char * listname)
else else
{ {
syslog(LOG_ERR, "Failed to send email to \"%s\" concerning this request.", owner); syslog(LOG_ERR, "Failed to send email to \"%s\" concerning this request.", owner);
exit(-1); exit(EXIT_FAILURE);
} }
return; return;
} }
@ -235,7 +235,7 @@ void hermes_main(char * incoming_mail, const char * listname)
if (rc < 0) if (rc < 0)
{ {
syslog(LOG_ERR, "Can't add address to ack file."); syslog(LOG_ERR, "Can't add address to ack file.");
exit(-1); exit(EXIT_FAILURE);
} }
} }
else else
@ -247,7 +247,7 @@ void hermes_main(char * incoming_mail, const char * listname)
if (rc < 0) if (rc < 0)
{ {
syslog(LOG_ERR, "Can't verify whether address \"%s\" needs to be acknowledged or not.", MailStruct->From); syslog(LOG_ERR, "Can't verify whether address \"%s\" needs to be acknowledged or not.", MailStruct->From);
exit(-1); exit(EXIT_FAILURE);
} }
else if (rc == 0) else if (rc == 0)
{ {
@ -282,7 +282,7 @@ void hermes_main(char * incoming_mail, const char * listname)
else else
{ {
syslog(LOG_ERR, "Failed to send email to \"%s\" concerning this request.", owner); syslog(LOG_ERR, "Failed to send email to \"%s\" concerning this request.", owner);
exit(-1); exit(EXIT_FAILURE);
} }
return; return;
} }