lkml.org 
[lkml]   [2012]   [Jul]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: + checkpatch-add-check-for-use-of-sizeof-without-parenthesis.patch added to -mm tree
On Mon, 9 Jul 2012, akpm@linux-foundation.org wrote:

> From: Joe Perches <joe@perches.com>
> Subject: checkpatch: Add acheck for use of sizeof without parenthesis
>
> Kernel style uses parenthesis around sizeof.
>

Nack, there's a difference between "sizeof *task" and
"sizeof(struct task_struct)". The former operates on a unary expression
and the latter operates on a type. There are over 1000 occurrences in the
kernel where the sizeof operator, the former, is used on a unary
expression.


\
 
 \ /
  Last update: 2012-07-10 01:01    [from the cache]
©2003-2011 Jasper Spaans