Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit d7df332d6b21d4d8728d0b37ac113ca9afeb82c0 1 parent d25a496
@arnaud-lb arnaud-lb authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 libketama/ketama.c
View
5 libketama/ketama.c
@@ -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] == '#' )
Please sign in to comment.
Something went wrong with that request. Please try again.