Signed-off-by: Jiri Palecek <[email protected]>
---
testcases/network/ipv6/sendfile6/testsf_s6.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/testcases/network/ipv6/sendfile6/testsf_s6.c
b/testcases/network/ipv6/sendfile6/testsf_s6.c
index fab2b17..a7ae05c 100644
--- a/testcases/network/ipv6/sendfile6/testsf_s6.c
+++ b/testcases/network/ipv6/sendfile6/testsf_s6.c
@@ -61,10 +61,14 @@ char *argv[];
memset(&hints, 0, sizeof(hints));
hints.ai_family = PF_INET6;
- if ((gai=getaddrinfo(argv[1], NULL, &hints, &hp))!=0)
+ if ((gai=getaddrinfo(argv[1], NULL, &hints, &hp))!=0) {
fprintf(stderr, "Unknown subject address %s: %s\n",argv[1],
gai_strerror(gai));
- if (!hp->ai_addr || hp->ai_addr->sa_family != AF_INET6)
+ exit(1);
+ }
+ if (!hp || !hp->ai_addr || hp->ai_addr->sa_family != AF_INET6) {
fprintf(stderr, "getaddrinfo failed");
+ exit(1);
+ }
/* server IP and port */
--
1.6.2
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty-free distribution of the report engine for externally facing
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list