The function strtol manages by default if we go over than long max or long min but in the prototype of ft_atoi, we can only return an int so this test is useless.
int
atoi(const char *str);
I have tested with a lot of ft_atoi of different libft of students and none manage these two cases.
1.The subject no longer asks us to code the memccpy function, so remove all tests and display.
First reported here by @ImOphen (#110).
2.Test about over long max and over long min is useless for our implementation of
ft_atoi
.If we check the implementation of
atoi
by Apple, they use the functionstrtol
for obtaining the result.The function
strtol
manages by default if we go over than long max or long min but in the prototype offt_atoi
, we can only return an int so this test is useless.I have tested with a lot of
ft_atoi
of different libft of students and none manage these two cases.