add a check for -i

This commit is contained in:
2025-04-29 02:13:49 +02:00
parent 208dcad657
commit 48c1eef0a3

View File

@ -6,7 +6,7 @@
/* By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/04/26 17:01:53 by tomoron #+# #+# */
/* Updated: 2025/04/29 02:08:34 by tomoron ### ########.fr */
/* Updated: 2025/04/29 02:13:24 by tomoron ### ########.fr */
/* */
/* ************************************************************************** */
#include "includes/ft_ping.h"
@ -129,6 +129,11 @@ int check_values(t_settings *set, char *name)
return(0);
}
}
if(set->interval < 0.2)
{
fprintf(stderr, "%s: option value is too small: %g\n", name, set->interval);
return(0);
}
return(1);
}