[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-cifs
Subject:    Re: [PATCH] Remove unnecessary check for NULL in password parser
From:       Jeff Layton <jlayton () redhat ! com>
Date:       2012-03-28 17:23:01
Message-ID: 20120328132301.792d5f35 () corrin ! poochiereds ! net
[Download RAW message or body]

On Wed, 28 Mar 2012 18:07:08 +0100
Sachin Prabhu <sprabhu@redhat.com> wrote:

> 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>
> ---
>  fs/cifs/connect.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
> index 302a15c..0511fdb 100644
> --- a/fs/cifs/connect.c
> +++ b/fs/cifs/connect.c
> @@ -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);

Reviewed-by: Jeff Layton <jlayton@redhat.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic