Bug 466762 - Add redirs for C23 free_sized() and free_aligned_sized()
[valgrind.git] / memcheck / tests / fwrite.c
blob9334b2960841d12d88bb76c690f36a3307c50c19
1 #include <fcntl.h>
2 #include <stdio.h>
3 #include <stdlib.h>
4 #include <unistd.h>
5 int main ( void )
7 char* arr = malloc(10);
8 int fd = open("/dev/null", O_WRONLY);
9 if (fd < 0) {
10 fprintf(stderr, "open failed\n");
11 } else {
12 (void)write(fd, arr, 10);
13 (void)close(fd);
16 return 0;