Explorar o 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 %!s(int64=13) %!d(string=hai) anos
pai
achega
bc650b3ddb
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

@@ -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);