From 0663d62be8a6f47b694c6382204a759a878c146c Mon Sep 17 00:00:00 2001 From: Alexey Khromov Date: Fri, 7 Jun 2024 23:08:49 +0300 Subject: [PATCH] minor fixes of warnings and misspellings --- source/bforce/daemon.c | 4 ++-- source/bforce/daemon_call.c | 4 ++-- source/bforce/freq_srif.c | 5 +++-- source/bforce/io_unix_tty.c | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/source/bforce/daemon.c b/source/bforce/daemon.c index 6ea4a21..d50a839 100644 --- a/source/bforce/daemon.c +++ b/source/bforce/daemon.c @@ -161,7 +161,7 @@ static int daemon_sysentry_init(s_sysentry *sysent) strcpy(msg, "freqs holded"); } - if( msg && *msg ) + if( *msg ) log("QUEUE: add %s (%s)", ftn_addrstr(abuf, sysent->node.addr), msg); else log("QUEUE: add %s", ftn_addrstr(abuf, sysent->node.addr)); @@ -194,7 +194,7 @@ static bool daemon_node_cancall_line(const s_node *node, const s_override *ovrd) if( modem_isgood_phone(ovrd->sPhone) ) good_phone = TRUE; } - else if( node && node->phone && *node->phone ) + else if( node && *node->phone ) { if( modem_isgood_phone(node->phone) ) good_phone = TRUE; diff --git a/source/bforce/daemon_call.c b/source/bforce/daemon_call.c index a8a3778..4bf2ec6 100644 --- a/source/bforce/daemon_call.c +++ b/source/bforce/daemon_call.c @@ -39,8 +39,8 @@ static s_modemport *daemon_getfree_port(const char *lockdir) static int daemon_call_branch(s_sysentry *syst, const char *lockdir, s_modemport *port) { - int rc = BFERR_NOERROR; - char abuf[BF_MAXADDRSTR+1]; + //int rc = BFERR_NOERROR; + //char abuf[BF_MAXADDRSTR+1]; /* * First of all restore the default signal handlers diff --git a/source/bforce/freq_srif.c b/source/bforce/freq_srif.c index bd9207e..7b7d38f 100644 --- a/source/bforce/freq_srif.c +++ b/source/bforce/freq_srif.c @@ -67,8 +67,9 @@ int req_createsrif(char *sname, char *req, char *rsp) fprintf(fp, "Sysop %s\n", cptr); else fprintf(fp, "Sysop SysOp\n"); - - if( aptr = session_1remote_address() ) + + aptr = session_1remote_address(); + if( aptr ) fprintf(fp, "AKA %s\n", ftn_addrstr(abuf, *aptr)); else return -1; diff --git a/source/bforce/io_unix_tty.c b/source/bforce/io_unix_tty.c index 75224db..8cd0189 100644 --- a/source/bforce/io_unix_tty.c +++ b/source/bforce/io_unix_tty.c @@ -307,7 +307,7 @@ int tty_putc(unsigned char ch, int timeout) int tty_puts(const unsigned char *s, int timeout) { - return tty_write_timeout(s, strlen(s), timeout); + return tty_write_timeout(s, strlen((char *)s), timeout); } int tty_getc(int timeout)