diff options
author | Rudy Bousset <rbousset@z2r5p6.le-101.fr> | 2019-10-30 18:16:42 +0100 |
---|---|---|
committer | Rudy Bousset <rbousset@z2r5p6.le-101.fr> | 2019-10-30 18:16:42 +0100 |
commit | 2dff0d522812e7e1e32f87e6edf21100e268e0ed (patch) | |
tree | eb54cb1056ebbb194f46e1fbeb2715ebc985406e /src/ft_error.c | |
parent | in progress (diff) | |
download | 42-minishell-2dff0d522812e7e1e32f87e6edf21100e268e0ed.tar.gz 42-minishell-2dff0d522812e7e1e32f87e6edf21100e268e0ed.tar.bz2 42-minishell-2dff0d522812e7e1e32f87e6edf21100e268e0ed.tar.xz 42-minishell-2dff0d522812e7e1e32f87e6edf21100e268e0ed.tar.zst 42-minishell-2dff0d522812e7e1e32f87e6edf21100e268e0ed.zip |
work work
Diffstat (limited to '')
-rw-r--r-- | src/ft_error.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ft_error.c b/src/ft_error.c index 5d0234f..7a2b61a 100644 --- a/src/ft_error.c +++ b/src/ft_error.c @@ -15,15 +15,15 @@ #include <minishell.h> int -ft_error(const char *com, int errno) +ft_error(const char *com, int err) { ft_putstr("joe-sh: "); ft_putstr(com); - if (errno == 1) + if (err == 1) ft_putendl(": too many arguments"); - else if (errno == 127) + else if (err == 127) ft_putendl(": command not found"); - else if (errno == 255) + else if (err == 255) ft_putendl(": numeric argument required"); - return (errno); + return (err); } |