Don't shadow a paramater
authorEric Andersen <andersen@codepoet.org>
Fri, 20 Jun 2003 09:25:34 +0000 (09:25 -0000)
committerEric Andersen <andersen@codepoet.org>
Fri, 20 Jun 2003 09:25:34 +0000 (09:25 -0000)
libbb/find_root_device.c

index 654f1714577894b2e801d787b935f70148198b16..7cbac0c56ca6b93a7401f95910f49966ffcdec0d 100644 (file)
@@ -48,13 +48,13 @@ extern char *find_real_root_device_name(const char* name)
                        bb_perror_msg("could not open '/dev'");
                else {
                        while((entry = readdir(dir)) != NULL) {
-                               const char *name = entry->d_name;
+                               const char *myname = entry->d_name;
                                /* Must skip ".." since that is "/", and so we
                                 * would get a false positive on ".."  */
-                               if (name[0] == '.' && name[1] == '.' && !name[2])
+                               if (myname[0] == '.' && myname[1] == '.' && !myname[2])
                                        continue;
 
-                               fileName = concat_path_file("/dev", name);
+                               fileName = concat_path_file("/dev", myname);
 
                                /* Some char devices have the same dev_t as block
                                 * devices, so make sure this is a block device */