fix crash when OCL_STRICT_CONFORMANCE is unset
authorGuo Yejun <yejun.guo@intel.com>
Mon, 23 Jun 2014 20:14:21 +0000 (04:14 +0800)
committerZhigang Gong <zhigang.gong@intel.com>
Tue, 24 Jun 2014 04:12:35 +0000 (12:12 +0800)
Signed-off-by: Guo Yejun <yejun.guo@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
utests/utest_generator.py

index 8d2f2a8..7522001 100644 (file)
@@ -24,7 +24,7 @@ def udebug(ulpSize,returnType):
 
     const char* env_strict = getenv("OCL_STRICT_CONFORMANCE");
 
-    if ( strcmp(env_strict, "0") == 0)
+    if (env_strict == NULL || strcmp(env_strict, "0") == 0)
       ULPSIZE_FACTOR = 1000;
     else
       ULPSIZE_FACTOR = 1;