mirror of
https://bitbucket.org/theswgsource/src-1.2.git
synced 2026-07-30 00:15:47 -04:00
fix the warns that actually matter
This commit is contained in:
+19
-20
@@ -370,28 +370,27 @@ char buffer[1024];
|
||||
x = 0;
|
||||
while(!feof(fp))
|
||||
{
|
||||
fgets( buffer, 1023, fp);
|
||||
|
||||
// get rid of '\n' and '\r' for comparisons
|
||||
strtok(buffer,"\r\n");
|
||||
len = (int)strlen(buffer);
|
||||
if( len > 0 )
|
||||
{
|
||||
if( nline == 0 )
|
||||
if (fgets( buffer, 1023, fp) != NULL) {
|
||||
// get rid of '\n' and '\r' for comparisons
|
||||
strtok(buffer,"\r\n");
|
||||
len = (int)strlen(buffer);
|
||||
if( len > 0 )
|
||||
{
|
||||
passString = (char *)malloc( len + 1 );
|
||||
strcpy(passString,buffer);
|
||||
if( nline == 0 )
|
||||
{
|
||||
passString = (char *)malloc( len + 1 );
|
||||
strcpy(passString,buffer);
|
||||
}
|
||||
else
|
||||
{
|
||||
allowedAddressList[x] = (char *)malloc( len + 1 );
|
||||
strcpy(allowedAddressList[x],buffer);
|
||||
x++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
allowedAddressList[x] = (char *)malloc( len + 1 );
|
||||
strcpy(allowedAddressList[x],buffer);
|
||||
x++;
|
||||
}
|
||||
}
|
||||
nline++;
|
||||
}
|
||||
|
||||
nline++;
|
||||
}
|
||||
}
|
||||
// clean up
|
||||
fclose(fp);
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user