diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2015-09-01 06:50:54 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2015-09-01 06:50:54 +0000 |
commit | 53c4fa064aee05ee7ca8241932cd5e5dbdab73d0 (patch) | |
tree | a06dae5c95806352d0511084c5821cf7664fd7fc /libexec | |
parent | 606ef25ea2b610b9ab42eb50e08f35058bfdf5c3 (diff) |
test pointers with NULL not '\0'
Diffstat (limited to 'libexec')
-rw-r--r-- | libexec/ftpd/ftpd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index 76dab886335..f688f469aad 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ftpd.c,v 1.207 2015/01/19 01:24:39 deraadt Exp $ */ +/* $OpenBSD: ftpd.c,v 1.208 2015/09/01 06:50:53 jsg Exp $ */ /* $NetBSD: ftpd.c,v 1.15 1995/06/03 22:46:47 mycroft Exp $ */ /* @@ -1959,10 +1959,10 @@ reply(int n, const char *fmt, ...) } next = buf; while ((p = strsep(&next, "\n\r"))) { - printf("%d%s %s\r\n", n, (next != '\0') ? "-" : "", p); + printf("%d%s %s\r\n", n, (next != NULL) ? "-" : "", p); if (debug) syslog(LOG_DEBUG, "<--- %d%s %s", n, - (next != '\0') ? "-" : "", p); + (next != NULL) ? "-" : "", p); } (void)fflush(stdout); free(buf); @@ -1987,7 +1987,7 @@ reply_r(int n, const char *fmt, ...) while ((p = strsep(&next, "\n\r"))) { snprintf(buf, sizeof(buf), "%d%s %s\r\n", n, - (next != '\0') ? "-" : "", p); + (next != NULL) ? "-" : "", p); write(STDOUT_FILENO, buf, strlen(buf)); if (debug) { buf[strlen(buf) - 2] = '\0'; |