From: Tommi Rantala <[email protected]>

---
 tipc-pipe/tipc-pipe.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tipc-pipe/tipc-pipe.c b/tipc-pipe/tipc-pipe.c
index 2c06df6..bf1888b 100644
--- a/tipc-pipe/tipc-pipe.c
+++ b/tipc-pipe/tipc-pipe.c
@@ -688,6 +688,10 @@ int main(int argc, char *argv[])
        init(argc, argv);
        buf = malloc(buf_size);
        tipc = socket(AF_TIPC, sock_type, 0);
+       if (tipc < 0) {
+               perror("socket()");
+               exit(EXIT_FAILURE);
+       }
        chkne(getsockname(tipc, (void *)&name, &addr_size));
        trvx_(name.addr.id.ref);
        trln();
-- 
2.9.3


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
tipc-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tipc-discussion

Reply via email to