aboutsummaryrefslogtreecommitdiffstats
path: root/src/ft_memset.c
blob: 5be8fe66751dd1934d31e2f7591c764896e3d706 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#include "libft.h"

void *
ft_memset (void *s, int c, size_t n)
{
  unsigned char *ptr;

  ptr = s;
  while (n--)
    *ptr++ = (unsigned char)c;
  return (s);
}