Explorar el Código

Do not compare a pointer to the integer value "0".

[Coccinelle] Zero-testing a pointer-typed value.
http://coccinelle.lip6.fr/rules/badzero.cocci
Cyril Roelandt hace 13 años
padre
commit
bc650b3ddb
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/drivers/opencl/driver_opencl_utils.c

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

@@ -137,7 +137,7 @@ char *_starpu_opencl_load_program_source(const char *filename)
         char        c;
 
         fh = fopen(filename, "r");
-        if (fh == 0)
+        if (!fh)
                 return NULL;
 
         stat(filename, &statbuf);