summaryrefslogtreecommitdiff
path: root/src/generic
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-07-29 07:57:17 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-07-29 07:57:17 +0900
commit29fce429004f9f14d79c5bfa97b1010c2113fa15 (patch)
tree1aaf8fdda86bb39366aeb74c5fdf6db1a8a39bb4 /src/generic
parent742fbc5717f3b70a4f3c900f648f9cc761985966 (diff)
evas generic gst loader - handle fwrite return value for coverity
fixes CID 1360467
Diffstat (limited to 'src/generic')
-rw-r--r--src/generic/evas/gst/main.c8
-rw-r--r--src/generic/evas/gst/main_0_10.c8
2 files changed, 12 insertions, 4 deletions
diff --git a/src/generic/evas/gst/main.c b/src/generic/evas/gst/main.c
index d9e6fa7..9156227 100644
--- a/src/generic/evas/gst/main.c
+++ b/src/generic/evas/gst/main.c
@@ -272,14 +272,18 @@ main(int argc, char **argv)
272 { 272 {
273 if (shm_fd >= 0) 273 if (shm_fd >= 0)
274 { 274 {
275 printf("shmfile %s\n", shmfile); 275 printf("shmfile %s\n", shmfile);
276 } 276 }
277 else 277 else
278 { 278 {
279 // could also to "tmpfile %s\n" like shmfile but just 279 // could also to "tmpfile %s\n" like shmfile but just
280 // a mmaped tmp file on the system 280 // a mmaped tmp file on the system
281 printf("data\n"); 281 printf("data\n");
282 fwrite(data, width * height * sizeof(DATA32), 1, stdout); 282 if (fwrite(data, width * height * sizeof(DATA32), 1, stdout) != 1)
283 {
284 shm_free();
285 return -1;
286 }
283 } 287 }
284 shm_free(); 288 shm_free();
285 } 289 }
diff --git a/src/generic/evas/gst/main_0_10.c b/src/generic/evas/gst/main_0_10.c
index 3e0c02b..8e38333 100644
--- a/src/generic/evas/gst/main_0_10.c
+++ b/src/generic/evas/gst/main_0_10.c
@@ -258,14 +258,18 @@ main(int argc, char **argv)
258 { 258 {
259 if (shm_fd >= 0) 259 if (shm_fd >= 0)
260 { 260 {
261 printf("shmfile %s\n", shmfile); 261 printf("shmfile %s\n", shmfile);
262 } 262 }
263 else 263 else
264 { 264 {
265 // could also to "tmpfile %s\n" like shmfile but just 265 // could also to "tmpfile %s\n" like shmfile but just
266 // a mmaped tmp file on the system 266 // a mmaped tmp file on the system
267 printf("data\n"); 267 printf("data\n");
268 fwrite(data, width * height * sizeof(DATA32), 1, stdout); 268 if (fwrite(data, width * height * sizeof(DATA32), 1, stdout) != 1)
269 {
270 shm_free();
271 return -1;
272 }
269 } 273 }
270 shm_free(); 274 shm_free();
271 } 275 }