[FIX] coding style

This commit is contained in:
Titouanhct
2025-04-15 19:21:53 +02:00
parent 23c43697e5
commit aa2a18ba03
3 changed files with 7 additions and 6 deletions

View File

@@ -126,7 +126,7 @@ static char *get_last_word(char *str)
if (!str)
return NULL;
while (str[x] != '\0') {
if(isblank(str[x]))
if (isblank(str[x]))
last_space = x + 1;
x++;
}

View File

@@ -15,10 +15,11 @@ int builtins_history(ef_t *ef, char **args __attribute__((unused)))
his_command_t *cmd_history = ef->builtin_handler->history_command;
for (int i = 0; i < cmd_history->sz; i++){
if (cmd_history[i].arg)
printf("%d %s %s\n", i, cmd_history[i].command, cmd_history[i].arg);
else
if (cmd_history[i].arg) {
printf("%d %s %s\n", i, cmd_history[i].command,
cmd_history[i].arg);
} else
printf("%d %s\n", i, cmd_history[i].command);
}
return RETURN_SUCCESS;
}
}

View File

@@ -33,7 +33,7 @@ int cmd_history_is_in(char *line)
{
for (int i = 0; line[i] != 0; i++)
if (line[i] == CHAR_HIST &&
(line[i + 1] != ' ' && line[i + 1] != '\t'
(line[i + 1] != ' ' && line[i + 1] != '\t'
&& line[i + 1] != '\0'))
return 0;
return 1;