From: Dave Jones <davej@redhat.com>
To: sfrench@samba.org
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
Andrew Morton <akpm@osdl.org>
Subject: remove useless checks in cifs connect.c
Date: Thu, 22 Jun 2006 22:09:42 -0400 [thread overview]
Message-ID: <20060623020942.GA22889@redhat.com> (raw)
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
next reply other threads:[~2006-06-23 2:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-23 2:09 Dave Jones [this message]
2006-06-23 15:38 ` remove useless checks in cifs connect.c Steven French
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060623020942.GA22889@redhat.com \
--to=davej@redhat.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sfrench@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.