libfetch: replace 0 with NULL for pointers.

Found with devel/coccinelle.

Reviewed by:	des
This commit is contained in:
pfg 2016-04-09 18:08:21 +00:00
parent 123efcdbc4
commit 5113401b57

View File

@ -929,7 +929,7 @@ ftp_authenticate(conn_t *conn, struct url *url, struct url *purl)
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;