Re: remove useless checks in cifs connect.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks - I can make this change - but quite soon this whole routine is 
going away (as well as most of the fs/cifs/connect.c) as the session setup 
code in fs/cifs/sess.c.

The original SessSetup routines in fs/cifs/connect.c badly needed a 
rewrite


Steve French
Senior Software Engineer
Linux Technology Center - IBM Austin
phone: 512-838-2294
email: sfrench at-sign us dot ibm dot com

Dave Jones <[email protected]> wrote on 06/22/2006 09:09:42 PM:

> The ; at the end of the 2nd if line in this diff caught my eye.
> On closer inspection the whole line is unnecessary
> anyway as kfree(NULL) is ok.
> 
> Also nuked another one a few lines up.
> 
> Signed-off-by: Dave Jones <[email protected]>
> 
> --- linux-2.6/fs/cifs/connect.c~   2006-06-22 22:07:04.000000000 -0400
> +++ linux-2.6/fs/cifs/connect.c   2006-06-22 22:07:42.000000000 -0400
> @@ -2822,15 +2822,13 @@ CIFSNTLMSSPNegotiateSessSetup(unsigned i
>                           = 0;
>                    } /* else no more room so create dummy domain string 
*/
>                    else {
> -                     if(ses->serverDomain)
> -                        kfree(ses->serverDomain);
> +                     kfree(ses->serverDomain);
>                       ses->serverDomain =
>                           kzalloc(2,
>                              GFP_KERNEL);
>                    }
>                 } else {   /* no room so create dummy domain and 
NOSstring */
> -                  if(ses->serverDomain);
> -                     kfree(ses->serverDomain);
> +                  kfree(ses->serverDomain);
>                    ses->serverDomain =
>                        kzalloc(2, GFP_KERNEL);
>                    if(ses->serverNOS)
> 
> -- 
> http://www.codemonkey.org.uk

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux