forked from enlightenment/efl
evas generic gst loader - handle fwrite return value for coverity
fixes CID 1360467
This commit is contained in:
parent
742fbc5717
commit
29fce42900
|
@ -272,14 +272,18 @@ main(int argc, char **argv)
|
|||
{
|
||||
if (shm_fd >= 0)
|
||||
{
|
||||
printf("shmfile %s\n", shmfile);
|
||||
printf("shmfile %s\n", shmfile);
|
||||
}
|
||||
else
|
||||
{
|
||||
// could also to "tmpfile %s\n" like shmfile but just
|
||||
// a mmaped tmp file on the system
|
||||
printf("data\n");
|
||||
fwrite(data, width * height * sizeof(DATA32), 1, stdout);
|
||||
if (fwrite(data, width * height * sizeof(DATA32), 1, stdout) != 1)
|
||||
{
|
||||
shm_free();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
shm_free();
|
||||
}
|
||||
|
|
|
@ -258,14 +258,18 @@ main(int argc, char **argv)
|
|||
{
|
||||
if (shm_fd >= 0)
|
||||
{
|
||||
printf("shmfile %s\n", shmfile);
|
||||
printf("shmfile %s\n", shmfile);
|
||||
}
|
||||
else
|
||||
{
|
||||
// could also to "tmpfile %s\n" like shmfile but just
|
||||
// a mmaped tmp file on the system
|
||||
printf("data\n");
|
||||
fwrite(data, width * height * sizeof(DATA32), 1, stdout);
|
||||
if (fwrite(data, width * height * sizeof(DATA32), 1, stdout) != 1)
|
||||
{
|
||||
shm_free();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
shm_free();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue