libfetch: replace 0 with NULL for pointers.

Found with devel/coccinelle.

Reviewed by:	des
This commit is contained in:
Pedro F. Giffuni 2016-04-09 18:08:21 +00:00
parent 648970d8eb
commit 3cd7f4295f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=297754

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;