diff options
| author | Dominik Kaiser | 2025-01-25 15:42:11 +0100 |
|---|---|---|
| committer | Dominik Kaiser | 2025-01-25 15:42:11 +0100 |
| commit | 21874e1446ccd08f4433870a69dbe1c08f8331a9 (patch) | |
| tree | e0d92a277fbb353167ff7909a2007f669058b5bc /src/get_cmd_path.c | |
| parent | b427100b6c0c655f74dc689533a3f36edfeebffc (diff) | |
| download | minishell-21874e1446ccd08f4433870a69dbe1c08f8331a9.tar.gz minishell-21874e1446ccd08f4433870a69dbe1c08f8331a9.zip | |
Make norminette happy
Diffstat (limited to 'src/get_cmd_path.c')
| -rw-r--r-- | src/get_cmd_path.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/get_cmd_path.c b/src/get_cmd_path.c index 8075a5f..aae80cd 100644 --- a/src/get_cmd_path.c +++ b/src/get_cmd_path.c @@ -6,7 +6,7 @@ /* By: chuhlig <chuhlig@student.42.fr> +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2024/12/17 19:19:59 by chuhlig #+# #+# */ -/* Updated: 2025/01/25 11:36:28 by chuhlig ### ########.fr */ +/* Updated: 2025/01/25 14:58:45 by dkaiser ### ########.fr */ /* */ /* ************************************************************************** */ @@ -86,11 +86,7 @@ static char *find_in_path(char *cmd, t_env *env, int *return_code) return (ft_free_split(path_start), cmd_path); path++; } - *return_code = 127; - free(cmd_path); - ft_free_split(path_start); - command_not_found_error(cmd); - return (NULL); + return (command_not_found_error(cmd, return_code, cmd_path, path_start)); } static char *get_simple_cmd_path(char *cmd, int *return_code) |
