1 #include <sys/socket.h>
11 res1
= socket(PF_UNIX
, SOCK_STREAM
, 0);
13 fprintf(stderr
, "socket() failed\n");
17 /* Valgrind 1.0.X doesn't report the second error */
18 res2
= getsockname(res1
, NULL
, &len
); /* NULL is bogus */
19 res3
= getsockname(res1
, &name
, NULL
); /* NULL is bogus */
21 fprintf(stderr
, "getsockname(1) failed\n");
24 fprintf(stderr
, "getsockname(2) failed\n");