chiark / gitweb /
[PATCH] fix the build for older versions of gcc
authorgreg@kroah.com <greg@kroah.com>
Thu, 4 Mar 2004 08:51:28 +0000 (00:51 -0800)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 04:35:08 +0000 (21:35 -0700)
udev-add.c

index c28256a..9562cb5 100644 (file)
@@ -226,10 +226,11 @@ static int create_node(struct udevice *dev, int fake)
                if (endptr[0] == '\0')
                        uid = (uid_t) id;
                else {
+                       struct passwd *pw;
                        if (strncmp(dev->owner, LOCAL_USER, sizeof(LOCAL_USER)) == 0)
                                set_to_local_user(dev->owner);
 
-                       struct passwd *pw = getpwnam(dev->owner);
+                       pw = getpwnam(dev->owner);
                        if (pw == NULL)
                                dbg("specified user unknown '%s'", dev->owner);
                        else