Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

  • Loading branch information...
commit d7df332d6b21d4d8728d0b37ac113ca9afeb82c0 1 parent d25a496
Arnaud Le Blanc arnaud-lb authored

Showing 1 changed file with 3 additions and 2 deletions. Show diff stats Hide diff stats

  1. +3 2 libketama/ketama.c
5 libketama/ketama.c
@@ -270,14 +270,15 @@ read_server_definitions( char* filename, unsigned int* count, unsigned long* mem
270 270 unsigned int lineno = 0;
271 271 unsigned int numservers = 0;
272 272 unsigned long memtotal = 0;
273   - char * ret;
274 273
275 274 FILE* fi = fopen( filename, "r" );
276 275 while ( fi && !feof( fi ) )
277 276 {
278 277 char sline[128] = "";
279 278
280   - ret = fgets( sline, 127, fi );
  279 + if (fgets( sline, 127, fi ) == NULL)
  280 + continue;
  281 +
281 282 lineno++;
282 283
283 284 if ( strlen( sline ) < 2 || sline[0] == '#' )

0 comments on commit d7df332

Please sign in to comment.
Something went wrong with that request. Please try again.