Fix the problem by kernel file open in utest
authorJunyan He <junyan.he@linux.intel.com>
Sun, 26 Jan 2014 10:16:12 +0000 (18:16 +0800)
committerZhigang Gong <zhigang.gong@intel.com>
Sat, 8 Feb 2014 04:21:54 +0000 (12:21 +0800)
Signed-off-by: Junyan He <junyan.he@linux.intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Tested-by: "Sun, Yi" <yi.sun@intel.com>
utests/utest_file_map.cpp

index da3361c..55b7771 100644 (file)
@@ -88,7 +88,7 @@ cl_file_map_open(cl_file_map_t *fm, const char *name)
 
   /* Open the file */
   fm->fd = open(name, O_RDONLY);
-  if(fm->fd <= 0) {
+  if(fm->fd < 0) {
     err = CL_FILE_MAP_FILE_NOT_FOUND;
     goto error;
   }