lkml.org 
[lkml]   [2016]   [May]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] ptrace: Fix WARNINGs for 'sizeof(X)' instead of 'sizeof X' in ptrace.c
Date
This patch fixes the checkpatch.pl WARNINGs to ptrace.c:

WARNING: sizeof siginfo should be sizeof(siginfo)

Signed-off-by: Wei Tang <tangwei@cmss.chinamobile.com>
---
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

\
 
 \ /
  Last update: 2016-05-30 04:21    [W:0.022 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site