diff --git a/mbfido/aliasdb.c b/mbfido/aliasdb.c index a5f72a0c..9b88885a 100644 --- a/mbfido/aliasdb.c +++ b/mbfido/aliasdb.c @@ -4,7 +4,7 @@ * Purpose ...............: Alias Database * ***************************************************************************** - * Copyright (C) 1997-2005 + * Copyright (C) 1997-2008 * * Michiel Broek FIDO: 2:280/2802 * Beekmansbos 10 @@ -126,7 +126,7 @@ int registrate(char *freename, char *address) } *q = '\0'; - Syslog('m', "Registrate \"%s\" \"%s\"", MBSE_SS(buf), MBSE_SS(address)); + Syslog('m', "Registrate \"%s\" \"%s\"", buf, MBSE_SS(address)); while (fread(&key, sizeof(key), 1, afp)) { if (!strcmp(key.freename, buf)) { @@ -146,9 +146,9 @@ int registrate(char *freename, char *address) key.dtime = time(NULL); if (fwrite(&key, sizeof(key), 1, afp) != 1) { - WriteError("$Cannot store: \"%s\" \"%s\"", MBSE_SS(buf), MBSE_SS(address)); + WriteError("$Cannot store: \"%s\" \"%s\"", buf, MBSE_SS(address)); } else { - Syslog('m', "Registered \"%s\" as \"%s\"", MBSE_SS(buf), MBSE_SS(address)); + Syslog('m', "Registered \"%s\" as \"%s\"", buf, MBSE_SS(address)); } close_alias_db(); return 1; diff --git a/mbfido/mbdiff.c b/mbfido/mbdiff.c index 1dc31e1c..b4d634d4 100644 --- a/mbfido/mbdiff.c +++ b/mbfido/mbdiff.c @@ -5,7 +5,7 @@ * Original ideas ........: Eugene G. Crosser. * ***************************************************************************** - * Copyright (C) 1997-2007 + * Copyright (C) 1997-2008 * * Michiel Broek FIDO: 2:280/2802 * Beekmansbos 10 @@ -279,7 +279,7 @@ int main(int argc, char **argv) else cmd = xstrcpy(archiver.munarc); - if ((cmd == NULL) || (cmd == "")) { + if ((cmd == NULL) || (strlen(cmd) == 0)) { show_log = TRUE; free(cmd); free(onl); diff --git a/mbfido/mbfutil.c b/mbfido/mbfutil.c index b3ad2247..280fd205 100644 --- a/mbfido/mbfutil.c +++ b/mbfido/mbfutil.c @@ -4,7 +4,7 @@ * Purpose: File Database Maintenance - utilities * ***************************************************************************** - * Copyright (C) 1997-2007 + * Copyright (C) 1997-2008 * * Michiel Broek FIDO: 2:280/2802 * Beekmansbos 10 @@ -237,7 +237,7 @@ int UnpackFile(char *File) } cmd = xstrcpy(archiver.funarc); - if ((cmd == NULL) || (cmd == "")) { + if ((cmd == NULL) || (strlen(cmd) == 0)) { WriteError("No unarc command available"); if (!do_quiet) printf("\nNo unarc command available\n"); diff --git a/mbfido/msg.c b/mbfido/msg.c index f2135734..52d58617 100644 --- a/mbfido/msg.c +++ b/mbfido/msg.c @@ -286,8 +286,8 @@ int toss_onemsg(char *msgname) Msg.Written = parsefdate(DateTime, NULL); Msg.Arrived = time(NULL) - (gmt_offset((time_t)0) * 60); - Msg.KillSent = ((Attribute & M_KILLSENT)); - Msg.Hold = ((Attribute & M_HOLD)); + Msg.KillSent = ((Attribute & M_KILLSENT)) ? 1:0; + Msg.Hold = ((Attribute & M_HOLD)) ? 1:0; Msg.Crash = ((Attribute & M_CRASH) || flag_on((char *)"CRA", flagstr)); Msg.ReceiptRequest = ((Attribute & M_RRQ) || flag_on((char *)"RRQ", flagstr)); Msg.Orphan = ((Attribute & M_ORPHAN)); diff --git a/mbfido/ptic.c b/mbfido/ptic.c index 618b6d5e..348bcdc8 100644 --- a/mbfido/ptic.c +++ b/mbfido/ptic.c @@ -400,11 +400,10 @@ int ProcessTic(fa_list **sbl, orphans **opl) return 1; } - cmd = xstrcpy(archiver.funarc); - - if ((cmd == NULL) || (cmd == "")) { + if (strlen(archiver.funarc) == 0) { Syslog('!', "No unarc command available"); } else { + cmd = xstrcpy(archiver.funarc); snprintf(temp1, PATH_MAX, "%s/%s", TIC.Inbound, TIC.TicIn.File); if (execute_str(cmd, temp1, (char *)NULL, (char *)"/dev/null", (char *)"/dev/null", (char *)"/dev/null") == 0) { UnPacked = TRUE; diff --git a/mbfido/unpack.c b/mbfido/unpack.c index be3a05eb..791d9897 100644 --- a/mbfido/unpack.c +++ b/mbfido/unpack.c @@ -4,7 +4,7 @@ * Purpose ...............: Unpacker * ***************************************************************************** - * Copyright (C) 1997-2007 + * Copyright (C) 1997-2008 * * Michiel Broek FIDO: 2:280/2802 * Beekmansbos 10 @@ -86,11 +86,11 @@ int unpack(char *fn) if (!getarchiver(unarc)) return 1; - cmd = xstrcpy(archiver.munarc); - - if ((cmd == NULL) || (cmd == "")) + if (strlen(archiver.munarc) == 0) return -1; + cmd = xstrcpy(archiver.munarc); + if ((ld = f_lock(fn)) == -1) { free(cmd); return 1;