Module: Mesa Branch: master Commit: 83a5b7e4689dcc36789f567847ccf65db858a9f3 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=83a5b7e4689dcc36789f567847ccf65db858a9f3
Author: Vinson Lee <[email protected]> Date: Mon Feb 22 23:49:50 2010 -0800 glsl/apps: Assert that ftell does not return an error. --- src/glsl/apps/compile.c | 1 + src/glsl/apps/process.c | 1 + src/glsl/apps/purify.c | 2 ++ src/glsl/apps/tokenise.c | 1 + src/glsl/apps/version.c | 1 + 5 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/glsl/apps/compile.c b/src/glsl/apps/compile.c index 3b3c083..21c2b76 100644 --- a/src/glsl/apps/compile.c +++ b/src/glsl/apps/compile.c @@ -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"); diff --git a/src/glsl/apps/process.c b/src/glsl/apps/process.c index e65f35c..c8a1a18 100644 --- a/src/glsl/apps/process.c +++ b/src/glsl/apps/process.c @@ -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"); diff --git a/src/glsl/apps/purify.c b/src/glsl/apps/purify.c index 3019e8b..5ab6bae 100644 --- a/src/glsl/apps/purify.c +++ b/src/glsl/apps/purify.c @@ -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"); diff --git a/src/glsl/apps/tokenise.c b/src/glsl/apps/tokenise.c index c70c3cc..b4c6d60 100644 --- a/src/glsl/apps/tokenise.c +++ b/src/glsl/apps/tokenise.c @@ -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"); diff --git a/src/glsl/apps/version.c b/src/glsl/apps/version.c index 0420f97..9820ad9 100644 --- a/src/glsl/apps/version.c +++ b/src/glsl/apps/version.c @@ -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"); _______________________________________________ mesa-commit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-commit
