Whamcloud - gitweb
b=21600 Fix unitialized pointer
authorBrian J. Murrell <brian@sun.com>
Wed, 16 Dec 2009 17:41:00 +0000 (12:41 -0500)
committerjohann <johann@granier.local>
Wed, 16 Dec 2009 18:05:25 +0000 (19:05 +0100)
gcc warns that ctx may be used prior to assignment, so initialize it
at declaration

i=rread
i=johann

lustre/utils/mkfs_lustre.c

index 5d4d45f..3d18e71 100644 (file)
@@ -1387,7 +1387,7 @@ int parse_opts(int argc, char *const argv[], struct mkfs_opts *mop,
  */
 static int in_mntlist(char *opt, char *mntlist)
 {
-        char *ml, *mlp, *item, *ctx;
+        char *ml, *mlp, *item, *ctx = NULL;
 
         if (!(ml = strdup(mntlist))) {
                 fprintf(stderr, "%s: out of memory\n", progname);