evas generic gst loader - handle fwrite return value for coverity

fixes CID 1360467
This commit is contained in:
Carsten Haitzler 2016-07-29 07:57:17 +09:00
parent 742fbc5717
commit 29fce42900
2 changed files with 12 additions and 4 deletions

View File

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

View File

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