Changeset 10754
- Timestamp:
- Jun 15, 2010, 12:38:10 AM (13 years ago)
- Location:
- trunk/libtransmission
- Files:
-
- 2 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/libtransmission/Makefile.am
r10635 r10754 27 27 crypto.c \ 28 28 fdlimit.c \ 29 ggets.c \30 29 handshake.c \ 31 30 history.c \ … … 78 77 completion.h \ 79 78 fdlimit.h \ 80 ggets.h \81 79 handshake.h \ 82 80 history.h \ -
trunk/libtransmission/blocklist.c
r10708 r10754 28 28 #include <assert.h> 29 29 30 #include "ggets.h"31 32 30 #include "transmission.h" 33 31 #include "platform.h" … … 305 303 const char * filename ) 306 304 { 307 FILE * 308 FILE * 309 char * line;310 int inCount = 0;311 int outCount = 0;305 FILE * in; 306 FILE * out; 307 int inCount = 0; 308 int outCount = 0; 309 char line[2048]; 312 310 const char * err_fmt = _( "Couldn't read \"%1$s\": %2$s" ); 313 311 … … 335 333 } 336 334 337 while( !fggets( &line, in ))335 while( fgets( line, sizeof( line ), in ) != NULL ) 338 336 { 339 337 char * walk; … … 350 348 /* don't try to display the actual lines - it causes issues */ 351 349 tr_err( _( "blocklist skipped invalid address at line %d" ), inCount ); 352 free( line );353 350 continue; 354 351 } 355 356 free( line );357 352 358 353 if( fwrite( &range, sizeof( struct tr_ip_range ), 1, out ) != 1 )
Note: See TracChangeset
for help on using the changeset viewer.