From 20b85c03e751b4876fa3c92040464e483172b746 Mon Sep 17 00:00:00 2001 From: Jannis Hoffmann Date: Wed, 3 Jul 2024 19:03:11 +0200 Subject: manual format adjustment --- src/srsforward.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'src/srsforward.c') diff --git a/src/srsforward.c b/src/srsforward.c index c855d36..0477d90 100644 --- a/src/srsforward.c +++ b/src/srsforward.c @@ -23,6 +23,7 @@ void die_nomem() { logmsg(WHO, 111, FATAL, "out of memory"); } + void die_control() { logmsg(WHO, 110, FATAL, "Unable to read control files"); @@ -35,14 +36,14 @@ struct constmap mapsrsdomains; stralloc srshost = {0}; stralloc srserror = {0}; -/** @file srsforward.c - @brief forwarding mails with SRS enhanced addresss - @return 0 on success (forwarded or not) - -3 SRS error with error output - 111 no memory / processing error - 110 control file not readable +/** + @file srsforward.c + @brief forwarding mails with SRS enhanced addresss + @return 0 on success (forwarded or not) + -3 SRS error with error output + 111 no memory / processing error + 110 control file not readable */ - static int srserror_str(int code) { if (!stralloc_copys(&srserror, "SRS: ")) die_nomem(); @@ -128,13 +129,16 @@ int main(int argc, char **argv) if (sendhost[j - 1] == '.') { if (!stralloc_copys(&srshost, sendhost)) die_nomem(); if (!stralloc_cats(&srshost, host)) die_nomem(); - } else if (!stralloc_copys(&srshost, sendhost)) + } else if (!stralloc_copys(&srshost, sendhost)) { die_nomem(); - } else if (!stralloc_copys(&srshost, host)) + } + } else if (!stralloc_copys(&srshost, host)) { die_nomem(); + } if (!stralloc_0(&srshost)) die_nomem(); - } else + } else { die_control(); + } /* Let's go SRS rewrite */ -- cgit v1.2.3