Skip to content

Commit d1c3a3f

Browse files
cyrillosKAGA-KOKO
authored andcommitted
posix-timers: Drop redundant memset() invocation
Initially in commit 6891c45 memset() was required to clear a variable allocated on stack. Commit 2482097 removed the on stack variable and retained the memset() despite the fact that the memory is allocated via kmem_cache_zalloc() and therefore zereoed already. Drop the redundant memset(). Signed-off-by: Cyrill Gorcunov <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Link: https://lore.kernel.org/all/Z9ctVxwaYOV4A2g4@grain
1 parent 8e63360 commit d1c3a3f

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

kernel/time/posix-timers.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,6 @@ static int do_timer_create(clockid_t which_clock, struct sigevent *event,
526526
} else {
527527
new_timer->it_sigev_notify = SIGEV_SIGNAL;
528528
new_timer->sigq.info.si_signo = SIGALRM;
529-
memset(&new_timer->sigq.info.si_value, 0, sizeof(sigval_t));
530529
new_timer->sigq.info.si_value.sival_int = new_timer->it_id;
531530
new_timer->it_pid = get_pid(task_tgid(current));
532531
}

0 commit comments

Comments
 (0)