Fixed cppcheck warnings

This commit is contained in:
James Booth
2014-04-26 00:36:36 +01:00
parent ab4ea80a70
commit d6e92f62dc
26 changed files with 41 additions and 206 deletions

View File

@@ -1191,12 +1191,11 @@ cmd_alias_remove(char *value)
void
cmd_autocomplete(char *input, int *size)
{
int i = 0;
char *found = NULL;
char inp_cpy[*size];
// autocomplete command
if ((strncmp(input, "/", 1) == 0) && (!str_contains(input, *size, ' '))) {
int i = 0;
char *found = NULL;
char inp_cpy[*size];
for(i = 0; i < *size; i++) {
inp_cpy[i] = input[i];
}