Compare commits

..

No commits in common. "14e05066ccab2c17dea5fc80a17d1d7c99eb7b9c" and "e4f19610c1b38a7b7a88b54dc1221b62a1bfd63b" have entirely different histories.

2 changed files with 8 additions and 8 deletions

View file

@ -6,7 +6,7 @@
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2026/03/24 11:23:47 by rparodi #+# #+# */
/* Updated: 2026/03/30 19:18:54 by rparodi ### ########.fr */
/* Updated: 2026/03/30 12:29:28 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */
@ -19,8 +19,8 @@
# define DEBUG 0
#endif
#define ERROR_LOG(str) if (DEBUG) {dprintf(2, "%sError:\t\t%s (%s:%d in %s)%s\n", CLR_RED, str, __FILE_NAME__, __LINE__, __FUNCTION__, CLR_RESET);} else { dprintf(2, "%s\n", str); }
#define ERROR_LOG(str) if (DEBUG) {dprintf(2, "%sError:\t%s (%s:%d in %s)%s\n", CLR_RED, str, __FILE_NAME__, __LINE__, __FUNCTION__, CLR_RESET);} else { dprintf(2, "%s\n", str); }
#define WARN_LOG(str) if (DEBUG) {dprintf(2, "%sWarning:\t%s (%s:%d in %s)%s\n", CLR_YELLOW, str, __FILE_NAME__, __LINE__, __FUNCTION__, CLR_RESET);}
#define INFO_LOG(str) if (DEBUG) {dprintf(2, "%sInfo:\t\t%s (%s:%d in %s)%s\n", CLR_BLUE, str, __FILE_NAME__, __LINE__, __FUNCTION__, CLR_RESET);}
#define DEBUG_LOG(str) if (DEBUG) {dprintf(2, "%sDebug:\t\t%s (%s:%d in %s)%s\n", CLR_GREY, str, __FILE_NAME__, __LINE__, __FUNCTION__, CLR_RESET);}
#define INFO_LOG(str) if (DEBUG) {dprintf(2, "%sInfo:\t%s (%s:%d in %s)%s\n", CLR_BLUE, str, __FILE_NAME__, __LINE__, __FUNCTION__, CLR_RESET);}
#define DEBUG_LOG(str) if (DEBUG) {dprintf(2, "%sDebug:\t%s (%s:%d in %s)%s\n", CLR_GREY, str, __FILE_NAME__, __LINE__, __FUNCTION__, CLR_RESET);}
#define SUCCESS_LOG(str) if (DEBUG) {dprintf(2, "%sSuccess:\t%s (%s:%d in %s)%s\n", CLR_GREEN, str, __FILE_NAME__, __LINE__, __FUNCTION__, CLR_RESET);}

View file

@ -6,7 +6,7 @@
/* By: rparodi <rparodi@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2026/03/23 14:49:36 by rparodi #+# #+# */
/* Updated: 2026/03/30 19:07:53 by rparodi ### ########.fr */
/* Updated: 2026/03/30 15:53:23 by rparodi ### ########.fr */
/* */
/* ************************************************************************** */
@ -29,7 +29,7 @@ static char *_find_target(int argc, char **argv) {
}
}
if (target == NULL) {
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.");
exit(64);
}