diff --git a/config-files.c b/config-files.c index df937c1..21eec8c 100644 --- a/config-files.c +++ b/config-files.c @@ -70,7 +70,7 @@ int InitPetidomo(const char* masterconfig) MasterConfig = calloc(sizeof(struct PD_Config), 1); if (MasterConfig == NULL) { - syslog(LOG_ERR, "Failed to allocate %d byte of memory.", sizeof(struct PD_Config)); + syslog(LOG_ERR, "Failed to allocate memory for the global PD_Config data structure."); return -1; } @@ -254,7 +254,7 @@ const struct List_Config* getListConfig(const char * listname) ListConfig = calloc(sizeof(struct List_Config), 1); if (ListConfig == NULL) { - syslog(LOG_ERR, "Failed to allocate %d byte of memory.", sizeof(struct List_Config)); + syslog(LOG_ERR, "Failed to allocate memory for List_Config data structure."); exit(EXIT_FAILURE); } if (!strcasecmp(listtype, "open")) diff --git a/rfcparse.c b/rfcparse.c index 27fb420..f80f87a 100644 --- a/rfcparse.c +++ b/rfcparse.c @@ -211,7 +211,7 @@ ParseMail(struct Mail **result, char * incoming_mail, const char * fqdn) MailStruct = calloc(sizeof(struct Mail), 1); if (MailStruct == NULL) { - syslog(LOG_ERR, "Failed to allocate %d byte of memory.", sizeof(struct Mail)); + syslog(LOG_ERR, "Failed to allocate memory for Mail data structure."); return -1; } @@ -220,7 +220,7 @@ ParseMail(struct Mail **result, char * incoming_mail, const char * fqdn) MailStruct->Header = strdup(incoming_mail); if (MailStruct->Header == NULL) { - syslog(LOG_ERR, "Failed to allocate %d byte of memory.", strlen(incoming_mail)); + syslog(LOG_ERR, "Failed to allocate memory for the incoming mail."); return -1; } for (MailStruct->Body = MailStruct->Header;