evas generic loader raw - fix small coverity complaint
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Sat, 9 Jul 2016 03:13:40 +0000 (12:13 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Sat, 9 Jul 2016 03:13:40 +0000 (12:13 +0900)
technically we dont handle a failed fwrite to stdout according to
coverity, but this is harmless as it doesnt matter if it fails - the
owner process cares. slave does not. silence CID 1356615

src/generic/evas/raw/main.c

index ac9f810..275815b 100644 (file)
@@ -229,7 +229,14 @@ int main(int argc, char **argv)
              else
                {
                   printf("data\n");
-                  fwrite(data, (unsigned int)(width * height) * sizeof(DATA32), 1, stdout);
+                  if (fwrite(data,
+                             (unsigned int)(width * height) * sizeof(DATA32),
+                             1, stdout) != 1)
+                    {
+                       shm_free();
+                       _raw_shutdown();
+                       return -1;
+                    }
                }
              shm_free();
           }