mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 07:18:17 +02:00
progs/glsl: Provide a better fix for fgets warning.
This commit is contained in:
parent
f00bf0598c
commit
5b2713c92a
1 changed files with 2 additions and 5 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue