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
Add missing zstd.h to coregrind Makefile.am noinst_HEADERS
[valgrind.git]
/
memcheck
/
tests
/
inline.c
blob
cb023b27d1447755c79d2f82bd51ccff5262a7db
1
2
#include <stdio.h>
3
#include <stdlib.h>
4
5
__inline__
6
static int
addemup
(
int
*
arr
)
7
{
8
int
i
,
j
=
0
;
9
for
(
i
=
0
;
i
<=
10
;
i
++)
10
j
+=
arr
[
i
];
11
return
j
;
12
}
13
14
int
main
(
void
)
15
{
16
int
sum
;
17
int
*
a
=
calloc
(
10
,
sizeof
(
int
));
18
sum
=
addemup
(
a
);
19
printf
(
"sum is %d
\n
"
,
sum
);
20
return
0
;
21
}