diff options
author | salad <fmoenne-@student.le-101.fr> | 2020-11-03 00:03:48 +0100 |
---|---|---|
committer | salad <fmoenne-@student.le-101.fr> | 2020-11-03 00:03:48 +0100 |
commit | b18fbce9a7e33f7e54949ae8de32fd7fc42e6ad1 (patch) | |
tree | 859e4d58e05622ef7a402e50ddd2ec913a51ef5d /src/m_loop.c | |
parent | strplen (diff) | |
download | 42-minishell-b18fbce9a7e33f7e54949ae8de32fd7fc42e6ad1.tar.gz 42-minishell-b18fbce9a7e33f7e54949ae8de32fd7fc42e6ad1.tar.bz2 42-minishell-b18fbce9a7e33f7e54949ae8de32fd7fc42e6ad1.tar.xz 42-minishell-b18fbce9a7e33f7e54949ae8de32fd7fc42e6ad1.tar.zst 42-minishell-b18fbce9a7e33f7e54949ae8de32fd7fc42e6ad1.zip |
this is it \(2009\) \: a Micheal Jackson Biopic
Diffstat (limited to 'src/m_loop.c')
-rw-r--r-- | src/m_loop.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/m_loop.c b/src/m_loop.c index 83caf6a..03ce8e2 100644 --- a/src/m_loop.c +++ b/src/m_loop.c @@ -138,10 +138,8 @@ unsigned char m_loop(int fd, t_msh *msh) msh->curr_hist_ptr = hist; while (gnl > 0) { - if (fd == STDIN_FILENO) - gnl = c_gnl(fd, &line, 1, msh); - else - gnl = get_next_line(fd, &line); + gnl = (fd == STDIN_FILENO) ? c_gnl(fd, &line, 1, msh) : + get_next_line(fd, &line); m_delete_comments(line); if (line[0] != C_NUL) { |