Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

fixed build error: variable ‘ret’ set but not used #4

Merged
merged 1 commit into from Dec 14, 2012
Jump to file or symbol
Failed to load files and symbols.
+3 −2
Split
View
@@ -270,14 +270,15 @@ read_server_definitions( char* filename, unsigned int* count, unsigned long* mem
unsigned int lineno = 0;
unsigned int numservers = 0;
unsigned long memtotal = 0;
- char * ret;
FILE* fi = fopen( filename, "r" );
while ( fi && !feof( fi ) )
{
char sline[128] = "";
- ret = fgets( sline, 127, fi );
+ if (fgets( sline, 127, fi ) == NULL)
+ continue;
+
lineno++;
if ( strlen( sline ) < 2 || sline[0] == '#' )