Skip to content
Snippets Groups Projects
Commit 770d0207 authored by rswindell's avatar rswindell
Browse files

Check if client->host is not-blank, not non-NULL.

Resolve warning: comparison of array 'client->host' not equal to a null pointer is always true in Clang
parent 4dac0c56
No related branches found
No related tags found
No related merge requests found
......@@ -2356,7 +2356,7 @@ BOOL user_downloaded_file(scfg_t* cfg, user_t* user, client_t* client,
ultoac(mod,tmp);
char username[64];
if(client != NULL && uploader.level >= SYSOP_LEVEL) {
if(client->host != NULL && strcmp(client->host, STR_NO_HOSTNAME) != 0)
if(client->host[0] != '\0' && strcmp(client->host, STR_NO_HOSTNAME) != 0)
SAFEPRINTF2(username,"%s [%s]", user->alias, client->host);
else
SAFEPRINTF2(username,"%s [%s]", user->alias, client->addr);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment