* remove useless checks in cifs connect.c
@ 2006-06-23 2:09 Dave Jones
2006-06-23 15:38 ` Steven French
0 siblings, 1 reply; 2+ messages in thread
From: Dave Jones @ 2006-06-23 2:09 UTC (permalink / raw)
To: sfrench; +Cc: Linux Kernel, Andrew Morton
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 <davej@redhat.com>
--- 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 NOS string */
- if(ses->serverDomain);
- kfree(ses->serverDomain);
+ kfree(ses->serverDomain);
ses->serverDomain =
kzalloc(2, GFP_KERNEL);
if(ses->serverNOS)
--
http://www.codemonkey.org.uk
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: remove useless checks in cifs connect.c
2006-06-23 2:09 remove useless checks in cifs connect.c Dave Jones
@ 2006-06-23 15:38 ` Steven French
0 siblings, 0 replies; 2+ messages in thread
From: Steven French @ 2006-06-23 15:38 UTC (permalink / raw)
To: Dave Jones; +Cc: Andrew Morton, Linux Kernel, sfrench
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 <davej@redhat.com> 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 <davej@redhat.com>
>
> --- 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-06-23 15:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-23 2:09 remove useless checks in cifs connect.c Dave Jones
2006-06-23 15:38 ` Steven French
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox