Explorar o código

src/drivers/opencl/driver_opencl_utils.c: fix previous commit #17183, fread returns the number of items read, and not the size

Nathalie Furmento %!s(int64=9) %!d(string=hai) anos
pai
achega
7eaf99d199
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/drivers/opencl/driver_opencl_utils.c

+ 1 - 1
src/drivers/opencl/driver_opencl_utils.c

@@ -193,7 +193,7 @@ char *_starpu_opencl_load_program_binary(const char *filename, size_t *len)
 	}
 
 	err = fread(binary, statbuf.st_size, 1, fh);
-	STARPU_ASSERT_MSG(err == statbuf.st_size, "could not read from file %s\n", filename);
+	STARPU_ASSERT_MSG(err == 1, "could not read from file %s\n", filename);
 	fclose(fh);
 
 	*len = statbuf.st_size;