From 14e05066ccab2c17dea5fc80a17d1d7c99eb7b9c Mon Sep 17 00:00:00 2001 From: Raphael Date: Mon, 30 Mar 2026 19:20:56 +0200 Subject: [PATCH] style(parsing/sources): using the same error message for empty args - This message is the same of the ping command (inetutils 2.0). --- parsing/sources/parsing.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/parsing/sources/parsing.c b/parsing/sources/parsing.c index 0ae2467..d8a4b1c 100644 --- a/parsing/sources/parsing.c +++ b/parsing/sources/parsing.c @@ -6,7 +6,7 @@ /* By: rparodi +#+ +:+ +#+ */ /* +#+#+#+#+#+ +#+ */ /* Created: 2026/03/23 14:49:36 by rparodi #+# #+# */ -/* Updated: 2026/03/30 15:53:23 by rparodi ### ########.fr */ +/* Updated: 2026/03/30 19:07:53 by rparodi ### ########.fr */ /* */ /* ************************************************************************** */ @@ -29,8 +29,8 @@ static char *_find_target(int argc, char **argv) { } } - if (target == NULL || target[0] == '\0') { - ERROR_LOG("ft_ping: missing host operand \n Try 'ft_ping --help' or 'ft_ping --usage' for more information."); + if (target == NULL) { + ERROR_LOG("ft_ping: missing host operand\nTry 'ft_ping --help' or 'ft_ping --usage' for more information."); exit(64); } @@ -40,7 +40,7 @@ static char *_find_target(int argc, char **argv) { void parsing_args(int argc, char **argv, t_flags *flags) { if (argc == 1) { - ERROR_LOG("ft_ping: missing host operand \n Try 'ft_ping --help' or 'ft_ping --usage' for more information."); + ERROR_LOG("ft_ping: missing host operand\nTry 'ft_ping --help' or 'ft_ping --usage' for more information."); exit(64); }