mirror of
https://github.com/glest/glest-source.git
synced 2025-08-13 03:44:00 +02:00
- bugfixes related to cppcheck report
- bugfixes found using valgrind (memory leaks)
This commit is contained in:
@@ -119,13 +119,14 @@ int ftpCreateAccount(const char* name, const char* passw, const char* root, int
|
||||
*/
|
||||
int ftpFindAccount(const char* name)
|
||||
{
|
||||
int n;
|
||||
|
||||
if(name[0] != '\0')
|
||||
for(n = 0; n < MAX_USERS; n++)
|
||||
if(!strncmp(ftpUsers[n].name, name, MAXLEN_USERNAME))
|
||||
if(name[0] != '\0') {
|
||||
int n;
|
||||
for(n = 0; n < MAX_USERS; n++) {
|
||||
if(!strncmp(ftpUsers[n].name, name, MAXLEN_USERNAME)) {
|
||||
return n + 1;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user