Whamcloud - gitweb
LU-299 Initialize struct shrinker variable in test
authorChristopher J. Morrone <morrone2@llnl.gov>
Tue, 10 May 2011 02:34:51 +0000 (19:34 -0700)
committerOleg Drokin <green@whamcloud.com>
Mon, 16 May 2011 21:14:06 +0000 (14:14 -0700)
If the "tmp" struct in the test is uninitialized, the test
will fail for that reason, rather its intended functions.

Change-Id: I4b1e97e511c748155f742909d9424f228fc24545
Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/522
Tested-by: Hudson
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Tested-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
libcfs/autoconf/lustre-libcfs.m4

index 254d5c6..af8418a 100644 (file)
@@ -676,7 +676,7 @@ AC_DEFUN([LC_SHRINKER_WANT_SHRINK_PTR],
 LB_LINUX_TRY_COMPILE([
         #include <linux/mm.h>
 ],[
 LB_LINUX_TRY_COMPILE([
         #include <linux/mm.h>
 ],[
-        struct shrinker tmp;
+        struct shrinker tmp = {0};
         tmp.shrink(NULL, 0, 0);
 ],[
         AC_MSG_RESULT(yes)
         tmp.shrink(NULL, 0, 0);
 ],[
         AC_MSG_RESULT(yes)