Introduction
Introduction Statistics Contact Development Disclaimer Help
getlistenfd: reorder + minor cleanup - geomyidae - A small C-based gopherd.
git clone git://bitreich.org/geomyidae/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfri…
Log
Files
Refs
Tags
README
LICENSE
---
commit 7474d9bd62ae23a8bd355aaf83be9fe9a9693d4d
parent 8d9bad389a4ac22fc292f92d0128af8679e640fa
Author: Hiltjo Posthuma <[email protected]>
Date: Wed, 29 Aug 2018 20:16:43 +0200
getlistenfd: reorder + minor cleanup
Signed-off-by: Christoph Lohmann <[email protected]>
Diffstat:
M main.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/main.c b/main.c
@@ -298,13 +298,10 @@ getlistenfd(struct addrinfo *hints, char *bindip, char *p…
void *sinaddr;
int on, listfd;
- listfd = -1;
-
- if (getaddrinfo(bindip, port, hints, &ai))
- return -1;
- if (ai == NULL)
+ if (getaddrinfo(bindip, port, hints, &ai) || ai == NULL)
return -1;
+ listfd = -1;
on = 1;
for (rp = ai; rp != NULL; rp = rp->ai_next) {
listfd = socket(rp->ai_family, rp->ai_socktype,
You are viewing proxied material from bitreich.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.