From: Oleg Nesterov Date: Thu, 23 Mar 2006 11:00:49 +0000 (-0800) Subject: [PATCH] sigprocmask: kill unneeded temp var X-Git-Tag: v2.6.17-rc1~1022 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a26fd335b481e0bd14f4e7d1f5e7bb1138b1731f;p=linux-2.6 [PATCH] sigprocmask: kill unneeded temp var Cleanup, remove unneeded double copying of current->blocked. Signed-off-by: Oleg Nesterov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/signal.c b/kernel/signal.c index dfb09ba5c0..75f7341b0c 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -2101,10 +2101,11 @@ long do_no_restart_syscall(struct restart_block *param) int sigprocmask(int how, sigset_t *set, sigset_t *oldset) { int error; - sigset_t old_block; spin_lock_irq(¤t->sighand->siglock); - old_block = current->blocked; + if (oldset) + *oldset = current->blocked; + error = 0; switch (how) { case SIG_BLOCK: @@ -2121,8 +2122,7 @@ int sigprocmask(int how, sigset_t *set, sigset_t *oldset) } recalc_sigpending(); spin_unlock_irq(¤t->sighand->siglock); - if (oldset) - *oldset = old_block; + return error; }