Skip to content

Commit

Permalink
Fix warning on impossible comparison
Browse files Browse the repository at this point in the history
workstation_RFC1001_name is part of the struct and can't be null,
remove impossible comparison (array vs. null)

Pointed out by Coverity (CID 140095)

Signed-off-by: Steve French <[email protected]>
Reviewed-by: Jeff Layton <[email protected]>
  • Loading branch information
smfrench committed Apr 1, 2015
1 parent 064bcc0 commit c85c35f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions fs/cifs/connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -2917,8 +2917,7 @@ ip_rfc1001_connect(struct TCP_Server_Info *server)
* calling name ends in null (byte 16) from old smb
* convention.
*/
if (server->workstation_RFC1001_name &&
server->workstation_RFC1001_name[0] != 0)
if (server->workstation_RFC1001_name[0] != 0)
rfc1002mangle(ses_init_buf->trailer.
session_req.calling_name,
server->workstation_RFC1001_name,
Expand Down

0 comments on commit c85c35f

Please sign in to comment.