X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/8a512ed5b7f75c8aaedbca887257ee01e5c2b621..93a6fce2ebf117f490d7ee11f066f75280d32386:/src/src/malware.c diff --git a/src/src/malware.c b/src/src/malware.c index c13e70616..9e71afc9b 100644 --- a/src/src/malware.c +++ b/src/src/malware.c @@ -382,7 +382,6 @@ uschar * s; cd->retry = 0; while ((s = string_nextinlist(&optstr, subsep, NULL, 0))) - { if (Ustrncmp(s, "retry=", 6) == 0) { int sec = readconf_readtime((s += 6), '\0', FALSE); @@ -392,7 +391,7 @@ while ((s = string_nextinlist(&optstr, subsep, NULL, 0))) } else return FAIL; - } +return OK; } /************************************************* @@ -887,7 +886,7 @@ if (!malware_ok) string_sprintf("unable to read result (%s)", strerror(errno)), sock); - for (p[bread] = '\0'; q = strchr(p, '\n'); p = q+1) + for (p[bread] = '\0'; q = Ustrchr(p, '\n'); p = q+1) { *q = '\0'; @@ -1098,17 +1097,16 @@ if (!malware_ok) sizeof(linebuffer), tmo))) { if (rcnt < 0) + { + int err = errno; if (rcnt == -1) break; - else - { - int err = errno; - (void) pclose(scanner_out); - signal(SIGCHLD,eximsigchld); signal(SIGPIPE,eximsigpipe); - return m_errlog_defer(scanent, string_sprintf( - "unable to read from scanner (%s): %s", - commandline, strerror(err))); - } + (void) pclose(scanner_out); + signal(SIGCHLD,eximsigchld); signal(SIGPIPE,eximsigpipe); + return m_errlog_defer(scanent, string_sprintf( + "unable to read from scanner (%s): %s", + commandline, strerror(err))); + } if (Ustrlen(linebuffer) > fwrite(linebuffer, 1, Ustrlen(linebuffer), scanner_record)) { @@ -1297,7 +1295,7 @@ if (!malware_ok) string_sprintf("missing port: '%s'", scanner_options)); continue; } - cd->tcp_port = atoi(s); + cd->tcp_port = atoi(CS s); /* parse options */ /*XXX should these options be common over scanner types? */