fix bench mode

This commit is contained in:
2026-01-09 12:13:59 +01:00
parent c138a43f0b
commit dae8fc84ea
3 changed files with 20 additions and 9 deletions

View File

@@ -6,7 +6,7 @@
/* By: dgaillet <dgaillet@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2026/01/08 14:30:38 by dgaillet #+# #+# */
/* Updated: 2026/01/08 14:32:19 by dgaillet ### ########lyon.fr */
/* Updated: 2026/01/09 12:05:56 by dgaillet ### ########lyon.fr */
/* */
/* ************************************************************************** */
@@ -15,6 +15,8 @@
void secure_write(int fd, char *str, int len)
{
if (len < 0)
return ;
if (write(fd, str, len) < 0)
exit (EXIT_FAILURE);
}