lkml.org 
[lkml]   [2005]   [Jun]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 2/2] kernel/power/disk.c string fix and if-less iterator
On Tue, 21 June 2005 00:10:41 +0200, Pavel Machek wrote:
>
> > The attached patch:
> >
> > o Fixes kernel/power/disk.c string declared as 'char *p = "...";' to be
> > declared as 'char p[] = "...";', as pointed by Jeff Garzik.
>
> ? Why was char *p ... wrong? Because you could not do sizeof() later?

Not necessarily wrong, but iirc, "*p" can waste 4 bytes (or 8, for
64-bit platforms). Since this variable isn't static, that's a
non-issue, but I've seen it on some kernel-janitor list anyway.

Jörn

--
Those who come seeking peace without a treaty are plotting.
-- Sun Tzu
-
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: 2005-06-21 10:24    [W:0.089 / U:0.760 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site