remove xmalloc check code
This commit is contained in:
parent
80f0b560ce
commit
01eb71582d
1 changed files with 1 additions and 16 deletions
|
|
@ -6,28 +6,13 @@
|
|||
/* By: kcolin <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2024/10/23 20:32:46 by kcolin #+# #+# */
|
||||
/* Updated: 2024/11/08 15:05:50 by kcolin ### ########.fr */
|
||||
/* Updated: 2024/11/08 15:11:45 by kcolin ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
#include "get_next_line.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
/*
|
||||
static int num_allocs = 0;
|
||||
|
||||
static void *xmalloc(size_t size)
|
||||
{
|
||||
if (FAIL_AFTER > 0 && num_allocs++ >= FAIL_AFTER)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
return malloc(size);
|
||||
}
|
||||
|
||||
#define malloc(x) xmalloc(x)
|
||||
*/
|
||||
|
||||
char *read_at_least_one_line(char *buffer, int fd)
|
||||
{
|
||||
char *read_buffer;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue