Date: Sat, 9 Apr 2016 18:08:21 +0000 (UTC) From: "Pedro F. Giffuni" <pfg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r297754 - head/lib/libfetch Message-ID: <201604091808.u39I8Lmr056456@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pfg Date: Sat Apr 9 18:08:21 2016 New Revision: 297754 URL: https://svnweb.freebsd.org/changeset/base/297754 Log: libfetch: replace 0 with NULL for pointers. Found with devel/coccinelle. Reviewed by: des Modified: head/lib/libfetch/ftp.c Modified: head/lib/libfetch/ftp.c ============================================================================== --- head/lib/libfetch/ftp.c Sat Apr 9 17:37:36 2016 (r297753) +++ head/lib/libfetch/ftp.c Sat Apr 9 18:08:21 2016 (r297754) @@ -929,7 +929,7 @@ ftp_authenticate(conn_t *conn, struct ur if (*pwd == '\0') pwd = getenv("FTP_PASSWORD"); if (pwd == NULL || *pwd == '\0') { - if ((logname = getlogin()) == 0) + if ((logname = getlogin()) == NULL) logname = FTP_ANONYMOUS_USER; if ((len = snprintf(pbuf, MAXLOGNAME + 1, "%s@", logname)) < 0) len = 0;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604091808.u39I8Lmr056456>