-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathft_bzero.c
More file actions
26 lines (24 loc) · 1.03 KB
/
Copy pathft_bzero.c
File metadata and controls
26 lines (24 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/* ************************************************************************** */
/* */
/* :::::::: */
/* ft_bzero.c :+: :+: */
/* +:+ */
/* By: cherrewi <cherrewi@student.codam.nl> +#+ */
/* +#+ */
/* Created: 2022/10/19 15:07:11 by cherrewi #+# #+# */
/* Updated: 2022/10/19 15:25:08 by cherrewi ######## odam.nl */
/* */
/* ************************************************************************** */
#include "libft.h"
/*
writes n zeroed bytes to the string s
*/
void ft_bzero(void *b, size_t n)
{
while (n)
{
*(unsigned char *)b = 0;
b++;
n--;
}
}