repo.or.cz
/
valgrind.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Bug 480126 - Build failure on Raspberry Pi 5 / OS 6.1.0-rpi7-rpi-v8
[valgrind.git]
/
memcheck
/
tests
/
fwrite.c
blob
9334b2960841d12d88bb76c690f36a3307c50c19
1
#include <fcntl.h>
2
#include <stdio.h>
3
#include <stdlib.h>
4
#include <unistd.h>
5
int
main
(
void
)
6
{
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
);
14
}
15
16
return
0
;
17
}