lkml.org 
[lkml]   [2007]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] De-constify sched.h
From
From: David Rientjes <rientjes@google.com>
Date: Fri, 26 Oct 2007 02:42:30 -0700 (PDT)

> On Fri, 26 Oct 2007, Alexey Dobriyan wrote:
>
> > 2) There is no such thing as const task_struct. Anyone who think otherwise
> > deserves compiler warning.
> >
>
> A 'const struct task_struct *' can be used as an annotation to mean that
> no member of the struct is modified through that pointer, so it's
> perfectly acceptable to qualify formals in that manner.

But in one of the cases he un-const's the code does modify
the object through the pointer. At least that one should
be reverted since the annotation is wrong.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-10-26 11:53    [W:0.333 / U:0.288 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site