ft_exit_err.c 1.0 KB

123456789101112131415161718192021
  1. /* ************************************************************************** */
  2. /* */
  3. /* ::: :::::::: */
  4. /* ft_exit_err.c :+: :+: :+: */
  5. /* +:+ +:+ +:+ */
  6. /* By: bchanot <bchanot@students.42.fr> +#+ +:+ +#+ */
  7. /* +#+#+#+#+#+ +#+ */
  8. /* Created: 2016/02/09 17:04:55 by bchanot #+# #+# */
  9. /* Updated: 2016/02/09 17:05:32 by bchanot ### ########.fr */
  10. /* */
  11. /* ************************************************************************** */
  12. #include "libft.h"
  13. #include <stdlib.h>
  14. void ft_exit_err(const char *str)
  15. {
  16. if (str != NULL)
  17. ft_putendl_fd(str, 1);
  18. exit(EXIT_FAILURE);
  19. }