Skip to content

Commit

Permalink
Remove unnecessary check for NULL in password parser
Browse files Browse the repository at this point in the history
The password parser has an unnecessary check for a NULL value which
triggers warnings in source checking tools. The code contains artifacts
from the old parsing code which are no longer required.

Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
  • Loading branch information
Sachin Prabhu authored and Steve French committed Apr 3, 2012
1 parent 66189be commit 1023807
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 @@ -1565,8 +1565,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,

/* Obtain the value string */
value = strchr(data, '=');
if (value != NULL)
*value++ = '\0';
value++;

/* Set tmp_end to end of the string */
tmp_end = (char *) value + strlen(value);
Expand Down

0 comments on commit 1023807

Please sign in to comment.