diff options
author | salad <fmoenne-@student.le-101.fr> | 2020-08-31 18:05:00 +0200 |
---|---|---|
committer | salad <fmoenne-@student.le-101.fr> | 2020-08-31 18:05:00 +0200 |
commit | 2ae54586f6dd2381e15b54fd510c7303e7ce366e (patch) | |
tree | ccffabdd60160902c1e0b543ba260db0b3da83df /src/p_lcom_next.c | |
parent | start normng (diff) | |
download | 42-minishell-2ae54586f6dd2381e15b54fd510c7303e7ce366e.tar.gz 42-minishell-2ae54586f6dd2381e15b54fd510c7303e7ce366e.tar.bz2 42-minishell-2ae54586f6dd2381e15b54fd510c7303e7ce366e.tar.xz 42-minishell-2ae54586f6dd2381e15b54fd510c7303e7ce366e.tar.zst 42-minishell-2ae54586f6dd2381e15b54fd510c7303e7ce366e.zip |
it all failed ?
Diffstat (limited to 'src/p_lcom_next.c')
-rw-r--r-- | src/p_lcom_next.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/p_lcom_next.c b/src/p_lcom_next.c index 5e5b69d..19e3287 100644 --- a/src/p_lcom_next.c +++ b/src/p_lcom_next.c @@ -67,13 +67,11 @@ static char j = 0; if (reg == TRUE) - { while (words[j] && j < i) { p_register_word(words[j], msh); j++; } - } j = 0; while (words[i + j] != NULL) j++; @@ -94,7 +92,6 @@ static char } rewords[i - k] = 0; ft_delwords(words); - i++; return (rewords); } @@ -115,11 +112,8 @@ char ptr = words[i]; while (*ptr != '\0' && *ptr != '=') ptr++; - if (*ptr == '=') - { - reg = TRUE; - isvar = TRUE; - } + reg = (*ptr == '=') ? TRUE : FALSE; + isvar = (*ptr == '=') ? TRUE : FALSE; if (*ptr == '\0' || words[i][0] == '=' || ft_isdigit(words[i][0]) == TRUE) { |