From: Nicolas Kaiser <nikai@nikai.net>
To: trinity@vger.kernel.org
Subject: [PATCH] overwritten assignment in sanitise_setsockopt
Date: Tue, 2 Apr 2013 13:40:03 +0200 [thread overview]
Message-ID: <20130402134003.747af8ed@absol.kitzblitz> (raw)
I noticed an assignment that gets immediately overwritten, contradicting
a nearby comment.
According to the comment, 'optval' should get disabled half of the time.
As at the time of the conditional assignment optval was already set to
different nonzero values, it looks to me like the trailing assignment,
which was introduced in commit 737e1a71, may be unintended.
Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
---
syscalls/setsockopt.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/syscalls/setsockopt.c b/syscalls/setsockopt.c
index 4d5877b..ce610af 100644
--- a/syscalls/setsockopt.c
+++ b/syscalls/setsockopt.c
@@ -322,8 +322,6 @@ void sanitise_setsockopt(int childno)
*/
if (rand() % 2)
shm->a4[childno] = 0;
-
- shm->a4[childno] = sizeof(int);
}
struct syscall syscall_setsockopt = {
next reply other threads:[~2013-04-02 11:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-02 11:40 Nicolas Kaiser [this message]
2013-04-02 14:15 ` [PATCH] overwritten assignment in sanitise_setsockopt Dave Jones
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=20130402134003.747af8ed@absol.kitzblitz \
--to=nikai@nikai.net \
--cc=trinity@vger.kernel.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.