#include "./data_private.h" int ft_gen_exit_code(t_data *data) { char *str; if (data->exit_code_str != NULL) free(data->exit_code_str); str = ft_itoa(data->exit_code); if (str == NULL) { ft_printf("minishell: malloc failed"); return (1); } data->exit_code_str = str; return (0); }