diff --git a/errors.c b/errors.c index e22ff59..fed724b 100644 --- a/errors.c +++ b/errors.c @@ -6,7 +6,7 @@ /* By: mea +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2022/05/06 13:15:59 by narnaud #+# #+# */ -/* Updated: 2022/05/27 08:47:01 by narnaud ### ########.fr */ +/* Updated: 2022/05/27 09:16:02 by narnaud ### ########.fr */ /* */ /* ************************************************************************** */ @@ -35,17 +35,17 @@ int is_valid_identifier(char *ident, int silent) if (!ft_isalpha(ident[i]) && !ft_isdigit(ident[i]) && ident[i] != '_') { - if (!silent) - cmd_error("export", "not an identifier: ", ident); - ft_putchar_fd('\n', 2); + if (!silent && cmd_error("export", + "not an identifier: ", ident)) + ft_putchar_fd('\n', 2); return (0); } i++; } return (1); } - if (!silent) - cmd_error("export", "not an identifier: ", ident); - ft_putchar_fd('\n', 2); + if (!silent && cmd_error("export", + "not an identifier: ", "\n")) + ft_putchar_fd('\n', 2); return (0); }