[PATCH] ptrace: Fix WARNINGs for 'sizeof(X)' instead of 'sizeof X' in ptrace.c
From: Wei Tang
Date: Sun May 29 2016 - 22:18:41 EST
This patch fixes the checkpatch.pl WARNINGs to ptrace.c:
WARNING: sizeof siginfo should be sizeof(siginfo)
Signed-off-by: Wei Tang <tangwei@xxxxxxxxxxxxxxxxxxxx>
---
kernel/ptrace.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/ptrace.c b/kernel/ptrace.c
index d49bfa1..76fa875 100644
--- a/kernel/ptrace.c
+++ b/kernel/ptrace.c
@@ -876,7 +876,7 @@ int ptrace_request(struct task_struct *child, long request,
break;
case PTRACE_SETSIGINFO:
- if (copy_from_user(&siginfo, datavp, sizeof siginfo))
+ if (copy_from_user(&siginfo, datavp, sizeof(siginfo)))
ret = -EFAULT;
else
ret = ptrace_setsiginfo(child, &siginfo);
@@ -1180,7 +1180,7 @@ int compat_ptrace_request(struct task_struct *child, compat_long_t request,
break;
case PTRACE_SETSIGINFO:
- memset(&siginfo, 0, sizeof siginfo);
+ memset(&siginfo, 0, sizeof(siginfo));
if (copy_siginfo_from_user32(
&siginfo, (struct compat_siginfo __user *) datap))
ret = -EFAULT;
--
1.9.1