]> err.no Git - systemd/commitdiff
[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 c28256a5a6f902f64030f2fafc7be0ee1ad4bbfc..9562cb5dbbc5de2ab956fc0352e2f1915b81b5a8 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