git.ckatri.com
/
mandoc.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
improve a comment explaining a particularly nasty hack; no code change
[mandoc.git]
/
test-strndup.c
1
#include <string.h>
2
3
int
4
main
(
void
)
5
{
6
char
*
s
;
7
8
s
=
strndup
(
"123"
,
2
);
9
return
s
[
0
] !=
'1'
?
1
:
s
[
1
] !=
'2'
?
2
:
s
[
2
] !=
'\0'
?
3
:
0
;
10
}