From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nate Lawson Subject: Re: [patch] remove null-ifiers Date: Tue, 27 Jan 2004 12:04:29 -0800 (PST) Sender: acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Message-ID: <20040127120357.X37323@root.org> References: <20040127150954.GA12740@hell.org.pl> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Return-path: In-Reply-To: <20040127150954.GA12740-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org> Errors-To: acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Karol Kozimor Cc: Jes Sorensen , acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, len.brown-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org List-Id: linux-acpi@vger.kernel.org On Tue, 27 Jan 2004, Karol Kozimor wrote: > Thus wrote Jes Sorensen: > > diff -urN -X /usr/people/jes/exclude-linux orig/linux-2.6.1-mm3-boot/drivers/acpi/asus_acpi.c linux-2.6.1-mm3/drivers/acpi/asus_acpi.c > > --- orig/linux-2.6.1-mm3-boot/drivers/acpi/asus_acpi.c Wed Dec 17 18:58:39 2003 > > +++ linux-2.6.1-mm3/drivers/acpi/asus_acpi.c Wed Jan 14 05:00:01 2004 > > @@ -73,8 +73,8 @@ > > MODULE_LICENSE("GPL"); > > > > > > -static uid_t asus_uid = 0; > > -static gid_t asus_gid = 0; > > +static uid_t asus_uid; > > +static gid_t asus_gid; > > MODULE_PARM(asus_uid, "i"); > > MODULE_PARM_DESC(uid, "UID for entries in /proc/acpi/asus.\n"); > > MODULE_PARM(asus_gid, "i"); > > We certainly *don't* want to do that, last time I checked C did not > actually guarantee to zero out uninitialized variables -- unless it's > different in the kernelspace. Are you sure pointers are initialized as > NULLs? Static variables have always been guaranteed to be initialized to 0, at least since K&R. -Nate ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn