overwritten assignment in sanitise_setsockopt
PATCH 1/1 overwritten assignment in sanitise_setsockopt
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.
--- syscalls/setsockopt.c | 2 -- 1 file changed, 2 deletions(-)
syscalls/setsockopt.c +0 -2
@@ -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 = {
Quoted 7 lines · Nicolas Kaiser
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.
Good catch. Applied.
thanks,
Dave