Whamcloud - gitweb
b=21600 Fix unitialized pointer
authorBrian J. Murrell <brian@sun.com>
Tue, 22 Dec 2009 18:29:12 +0000 (13:29 -0500)
committerRobert Read <rread@sun.com>
Tue, 22 Dec 2009 19:10:48 +0000 (11:10 -0800)
gcc warns that ctx may be used prior to assignment, so initialize it
at declaration

lustre/utils/mkfs_lustre.c

index a4fb608..09df6c0 100644 (file)
@@ -1431,7 +1431,7 @@ static int in_mntlist(char *opt, char *mntlist)
 static int check_mountfsoptions(char *mountopts, char *wanted_mountopts,
                                 int justwarn)
 {
-        char *ml, *mlp, *item, *ctx;
+        char *ml, *mlp, *item, *ctx = NULL;
         int errors = 0;
 
         if (!(ml = strdup(wanted_mountopts))) {