Messages in this thread | | | Subject | Re: [PATCH] Combined APM patch | From | Thomas Hood <> | Date | 18 Jan 2002 05:43:48 -0500 |
| |
On Fri, 2002-01-11 at 10:40, Russell King wrote: > On Fri, Jan 11, 2002 at 10:22:24AM -0500, Thomas Hood wrote: > > if someone later wants to modify the code to make > > this variable non-static, the comment tells that person that > > the variable will need an initializer. > > Whether a variable is static or not doesn't change whether it ends up in > the bss segment or not.
It does make a difference if the variable definitions are inside a function; the non-static variable is on the stack and is not initialized to zero.
I understand that every static or top-level global variable is initialized to zero; but is it not useful to note when the code _relies upon_ this zero-initialization?
- 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/
| |