lua: return on socket init failure

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-10-04 10:11:43 +02:00
parent b3580fc519
commit c8640013c2

4
luaa.c
View file

@ -944,10 +944,10 @@ luaA_cs_init(void)
if(unlink(addr->sun_path)) if(unlink(addr->sun_path))
warn("error unlinking existing file: %s", strerror(errno)); warn("error unlinking existing file: %s", strerror(errno));
if(bind(csfd, (const struct sockaddr *) addr, SUN_LEN(addr))) if(bind(csfd, (const struct sockaddr *) addr, SUN_LEN(addr)))
warn("error binding UNIX domain socket: %s", strerror(errno)); return warn("error binding UNIX domain socket: %s", strerror(errno));
} }
else else
warn("error binding UNIX domain socket: %s", strerror(errno)); return warn("error binding UNIX domain socket: %s", strerror(errno));
} }
listen(csfd, 10); listen(csfd, 10);