On Tue, 5 Apr 2011 12:06:59 -0500
Steve French <[email protected]> wrote:

> This is fine, but what about this alternative (initializing variables
> can make code easier to read, and given dumb compiler warnings
> sometimes better to leave in variable initialization ...):
> 
> stevef@stevef-laptop:~/cifs-2.6$ git diff -a
> diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
> index 92e33d4..e4993a2 100644
> --- a/fs/cifs/cifssmb.c
> +++ b/fs/cifs/cifssmb.c
> @@ -117,7 +117,7 @@ cifs_reconnect_tcon(struct cifs_tcon *tcon, int 
> smb_command)
>          * calling routine
>          */
>         if (!tcon)
> -               return 0;
> +               return rc;
> 
>         ses = tcon->ses;
>         server = ses->server;
> 
> 

So instead of eliminating a useless variable initialization, we instead
manufacture a use for it? That seems sort of counter-productive, no?

-- 
Jeff Layton <[email protected]>
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to