glsl/apps: Assert that ftell does not return an error.

This commit is contained in:
Vinson Lee 2010-02-22 23:49:50 -08:00
parent a0fe36a39b
commit 83a5b7e468
5 changed files with 6 additions and 0 deletions

View file

@ -79,6 +79,7 @@ main(int argc,
fseek(in, 0, SEEK_END);
size = ftell(in);
assert(size != -1);
fseek(in, 0, SEEK_SET);
out = fopen(argv[3], "w");

View file

@ -58,6 +58,7 @@ main(int argc,
fseek(in, 0, SEEK_END);
size = ftell(in);
assert(size != -1);
fseek(in, 0, SEEK_SET);
out = fopen(argv[2], "wb");

View file

@ -25,6 +25,7 @@
*
**************************************************************************/
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@ -56,6 +57,7 @@ main(int argc,
fseek(in, 0, SEEK_END);
size = ftell(in);
assert(size != -1);
fseek(in, 0, SEEK_SET);
out = fopen(argv[2], "wb");

View file

@ -57,6 +57,7 @@ main(int argc,
fseek(in, 0, SEEK_END);
size = ftell(in);
assert(size != -1);
fseek(in, 0, SEEK_SET);
out = fopen(argv[2], "wb");

View file

@ -56,6 +56,7 @@ main(int argc,
fseek(in, 0, SEEK_END);
size = ftell(in);
assert(size != -1);
fseek(in, 0, SEEK_SET);
out = fopen(argv[2], "wb");