alelievr / libft-unit-test

453 stars 88 forks source link

fix: update test calloc to handle NULL return #148

Closed MalwarePup closed 1 year ago

MalwarePup commented 1 year ago

The change updates the test code for the ft_calloc function to handle the case where calloc returns NULL, which can happen if the nmemb or size parameter is 0 or if the function is unable to allocate memory. The change ensures that the test code follows the behavior described in the man page for calloc and should be portable across different systems and versions of the C standard library.

@alelievr Are you okay?