forked from github/server
bad variable reuse leads to gcc confusion
This commit is contained in:
parent
8b6da79984
commit
5f4c31af1c
|
@ -65,14 +65,15 @@ int config_read(const char *filename, const char * relpath)
|
||||||
F = fopen(filename, "rt");
|
F = fopen(filename, "rt");
|
||||||
}
|
}
|
||||||
if (F) {
|
if (F) {
|
||||||
long result;
|
long size;
|
||||||
|
int result;
|
||||||
char *data;
|
char *data;
|
||||||
|
|
||||||
fseek(F, 0, SEEK_END);
|
fseek(F, 0, SEEK_END);
|
||||||
result = ftell(F);
|
size = ftell(F);
|
||||||
rewind(F);
|
rewind(F);
|
||||||
if (result > 0) {
|
if (size > 0) {
|
||||||
size_t sz = (size_t)result;
|
size_t sz = (size_t)size;
|
||||||
data = malloc(sz);
|
data = malloc(sz);
|
||||||
fread(data, 1, sz, F);
|
fread(data, 1, sz, F);
|
||||||
fclose(F);
|
fclose(F);
|
||||||
|
|
Loading…
Reference in New Issue