[Beignet] [PATCH] Fix the problem by kernel file open in utest

junyan.he at inbox.com junyan.he at inbox.com
Sun Jan 26 02:16:12 PST 2014


From: Junyan He <junyan.he at linux.intel.com>

Signed-off-by: Junyan He <junyan.he at linux.intel.com>
---
 utests/utest_file_map.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utests/utest_file_map.cpp b/utests/utest_file_map.cpp
index da3361c..55b7771 100644
--- a/utests/utest_file_map.cpp
+++ b/utests/utest_file_map.cpp
@@ -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;
   }
-- 
1.7.9.5



More information about the Beignet mailing list