diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-08-14 20:50:57 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-08-14 20:50:57 +0200 |
commit | a2dc5174eb19caebf074b446dae129d17485e7bb (patch) | |
tree | 7fcf83e441d10ed9ef60db10de819b1c927dc263 /src/p_line.c | |
parent | Just a few more line and we're good (diff) | |
download | 42-minishell-a2dc5174eb19caebf074b446dae129d17485e7bb.tar.gz 42-minishell-a2dc5174eb19caebf074b446dae129d17485e7bb.tar.bz2 42-minishell-a2dc5174eb19caebf074b446dae129d17485e7bb.tar.xz 42-minishell-a2dc5174eb19caebf074b446dae129d17485e7bb.tar.zst 42-minishell-a2dc5174eb19caebf074b446dae129d17485e7bb.zip |
&& and || works pretty bav
Diffstat (limited to 'src/p_line.c')
-rw-r--r-- | src/p_line.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/src/p_line.c b/src/p_line.c index 23a3896..6e02525 100644 --- a/src/p_line.c +++ b/src/p_line.c @@ -24,25 +24,7 @@ void p_line(char line[], t_msh *msh) { - char *ptr; - uint64_t count; - - count = 0; - ptr = line; - while (*ptr != '\0') - { - - if (*ptr == ';') - { - count += 1; - } - ptr++; - } - if (*(ptr - 1) == ';') - { - count -= 1; - } - if (p_lcom(line, count, msh) < 0) + if (p_lcom(line, msh) < 0) { f_alloc_and_destroy_msh(msh); } |