Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #4 from arnaud-lb/buildfix

fixed build error: variable ‘ret’ set but not used
  • Loading branch information...
commit 175733dcb5716c3d6ba44d9b27a02e144fb4bbe6 2 parents d25a496 + d7df332
@RJ 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.