Whamcloud - gitweb
LU-1283 utils: Use variable without initialize
authorMinh Diep <mdiep@whamcloud.com>
Wed, 4 Apr 2012 19:38:10 +0000 (12:38 -0700)
committerOleg Drokin <green@whamcloud.com>
Fri, 9 Nov 2012 01:41:47 +0000 (20:41 -0500)
We need to initialize char *savept before use it

Signed-off-by: Minh Diep <mdiep@whamcloud.com>
Change-Id: I0c8155d84e255fcf55e98f5b84a09faf8f8487ef
Reviewed-on: http://review.whamcloud.com/2448
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Cliff White <cliffw@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/utils/mount_lustre.c

index 00dd74e..4f8f7c6 100644 (file)
@@ -371,7 +371,7 @@ int set_blockdev_tunables(char *source, int fan_out)
         glob_t glob_info = { 0 };
         struct stat stat_buf;
         char *chk_major, *chk_minor;
-        char *savept, *dev;
+        char *savept = NULL, *dev;
         char *ret_path;
         char buf[PATH_MAX] = {'\0'}, path[PATH_MAX] = {'\0'};
         char real_path[PATH_MAX] = {'\0'};