data_structures
ds_bzero.c
Go to the documentation of this file.
1 /* ************************************************************************** */
3 /* */
4 /* ::: :::::::: */
5 /* ds_bzero.c :+: :+: :+: */
6 /* +:+ +:+ +:+ */
7 /* By: unite <marvin@42.fr> +#+ +:+ +#+ */
8 /* +#+#+#+#+#+ +#+ */
9 /* Created: 2019/09/05 16:17:11 by unite #+# #+# */
10 /* Updated: 2020/09/05 20:21:21 by unite ### ########.fr */
11 /* */
12 /* ************************************************************************** */
13 
14 #include "utils.h"
15 
20 void ds_bzero(void *s, size_t n)
21 {
22  size_t i;
23  unsigned char *s1;
24 
25  i = 0;
26  s1 = (unsigned char *)s;
27  while (i < n)
28  s1[i++] = 0;
29 }
ds_bzero
void ds_bzero(void *s, size_t n)
Replicates behaviour of bzero from libc.
Definition: ds_bzero.c:20
utils.h