projects
/
libc-test
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
add an inet_pton regression test
[libc-test]
/
src
/
regression
/
inet_pton-invalid-address.c
1
// inet_pton should return 0 on invalid address format
2
#include <string.h>
3
#include <arpa/inet.h>
4
#include "test.h"
5
6
int main(void)
7
{
8
int r;
9
char addr[16];
10
11
if ((r=inet_pton(AF_INET6, "192.168.1.1", addr)) != 0)
12
t_error("inet_pton(AF_INET6, \"192.168.1.1\", addr) should return 0, got %d\n", r);
13
return t_status;
14
}