diff options
author | Dmitry Podgorny <pasis.ua@gmail.com> | 2013-08-03 13:17:50 +0300 |
---|---|---|
committer | Dmitry Podgorny <pasis.ua@gmail.com> | 2013-08-03 13:17:50 +0300 |
commit | c559d96d7739d499f9b747839e1115d28976306f (patch) | |
tree | 7784646790dcefe3854f4c347712f051825875d0 /src/tools | |
parent | 51b2137705b99ad45a8d4d646da9f3f8e2b3b4db (diff) | |
download | profani-tty-c559d96d7739d499f9b747839e1115d28976306f.tar.gz |
removed sizeof(char)
sizeof(char) == 1 according to standard
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/autocomplete.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/autocomplete.c b/src/tools/autocomplete.c index 0c56cac7..8426de85 100644 --- a/src/tools/autocomplete.c +++ b/src/tools/autocomplete.c @@ -220,7 +220,7 @@ autocomplete_param_with_func(char *input, int *size, char *command, inp_cpy[(*size) - len] = '\0'; found = func(inp_cpy); if (found != NULL) { - auto_msg = (char *) malloc((len + (strlen(found) + 1)) * sizeof(char)); + auto_msg = (char *) malloc(len + strlen(found) + 1); strcpy(auto_msg, command_cpy); strcat(auto_msg, found); free(found); @@ -249,7 +249,7 @@ autocomplete_param_with_ac(char *input, int *size, char *command, inp_cpy[(*size) - len] = '\0'; found = autocomplete_complete(ac, inp_cpy); if (found != NULL) { - auto_msg = (char *) malloc((len + (strlen(found) + 1)) * sizeof(char)); + auto_msg = (char *) malloc(len + strlen(found) + 1); strcpy(auto_msg, command_cpy); strcat(auto_msg, found); free(found); |