projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f00bf05
)
progs/glsl: Provide a better fix for fgets warning.
author
Vinson Lee
<vlee@vmware.com>
Wed, 30 Dec 2009 20:38:21 +0000
(12:38 -0800)
committer
Vinson Lee
<vlee@vmware.com>
Wed, 30 Dec 2009 20:38:21 +0000
(12:38 -0800)
progs/glsl/shtest.c
patch
|
blob
|
history
diff --git
a/progs/glsl/shtest.c
b/progs/glsl/shtest.c
index 3c795437f42ce4c2bbcac088f49b1923df679774..e9800c307f3f092b405fcd007493f3ef757b0911 100644
(file)
--- 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;