Skip to content
Snippets Groups Projects
Commit f0fe4dc4 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Resolve new(er) warnings comparing client_t.protocol with NULL

client_t.protocol is no longer a pointer.

Warnings reported by gcc (Debian 12.2.0-14) 12.2.0
parent 5893d07f
No related branches found
No related tags found
1 merge request!455Update branch with changes from master
Pipeline #6417 passed
...@@ -701,7 +701,7 @@ int file_client_hfields(file_t* f, client_t* client) ...@@ -701,7 +701,7 @@ int file_client_hfields(file_t* f, client_t* client)
return i; return i;
if(*client->host && (i = smb_hfield_str(f, SENDERHOSTNAME, client->host)) != SMB_SUCCESS) if(*client->host && (i = smb_hfield_str(f, SENDERHOSTNAME, client->host)) != SMB_SUCCESS)
return i; return i;
if(client->protocol != NULL && (i = smb_hfield_str(f, SENDERPROTOCOL, client->protocol)) != SMB_SUCCESS) if((i = smb_hfield_str(f, SENDERPROTOCOL, client->protocol)) != SMB_SUCCESS)
return i; return i;
if(client->port) { if(client->port) {
char port[16]; char port[16];
......
...@@ -1825,7 +1825,6 @@ js_new_user(JSContext *cx, uintN argc, jsval *arglist) ...@@ -1825,7 +1825,6 @@ js_new_user(JSContext *cx, uintN argc, jsval *arglist)
} }
} }
if(client!=NULL) { if(client!=NULL) {
if(client->protocol != NULL)
SAFECOPY(user.modem,client->protocol); SAFECOPY(user.modem,client->protocol);
SAFECOPY(user.comp,client->host); SAFECOPY(user.comp,client->host);
SAFECOPY(user.ipaddr,client->addr); SAFECOPY(user.ipaddr,client->addr);
......
...@@ -397,7 +397,7 @@ extern "C" int msg_client_hfields(smbmsg_t* msg, client_t* client) ...@@ -397,7 +397,7 @@ extern "C" int msg_client_hfields(smbmsg_t* msg, client_t* client)
if(*client->host if(*client->host
&& (i=smb_hfield_str(msg,SENDERHOSTNAME,client->host))!=SMB_SUCCESS) && (i=smb_hfield_str(msg,SENDERHOSTNAME,client->host))!=SMB_SUCCESS)
return(i); return(i);
if(client->protocol!=NULL && (i=smb_hfield_str(msg,SENDERPROTOCOL,client->protocol))!=SMB_SUCCESS) if((i=smb_hfield_str(msg,SENDERPROTOCOL,client->protocol))!=SMB_SUCCESS)
return(i); return(i);
if(client->port) { if(client->port) {
SAFEPRINTF(port,"%u",client->port); SAFEPRINTF(port,"%u",client->port);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment