summaryrefslogtreecommitdiffstats
path: root/progs/glsl/shtest.c
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2009-12-30 12:38:21 -0800
committerVinson Lee <[email protected]>2009-12-30 12:38:21 -0800
commit5b2713c92a89fc6c47c3546d36eeb549e126ebc0 (patch)
treed2d2b01e9ca541b1fe1184ae682b07c669cc5f6b /progs/glsl/shtest.c
parentf00bf0598cfcd9ab9b923d80b7ce2cec14a74da5 (diff)
progs/glsl: Provide a better fix for fgets warning.
Diffstat (limited to 'progs/glsl/shtest.c')
-rw-r--r--progs/glsl/shtest.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/progs/glsl/shtest.c b/progs/glsl/shtest.c
index 3c795437f42..e9800c307f3 100644
--- a/progs/glsl/shtest.c
+++ b/progs/glsl/shtest.c
@@ -492,11 +492,8 @@ ReadConfigFile(const char *filename, struct config_file *conf)
conf->num_uniforms = 0;
/* ugly but functional parser */
- while (!feof(f)) {
- char *result;
- result = fgets(line, sizeof(line), f);
- (void) result;
- if (!feof(f) && line[0]) {
+ while (fgets(line, sizeof(line), f) != NULL) {
+ if (line[0]) {
if (strncmp(line, "vs ", 3) == 0) {
VertShaderFile = strdup(line + 3);
VertShaderFile[strlen(VertShaderFile) - 1] = 0;