chiark
/
gitweb
/
~mdw
/
preload-hacks
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
61fbb4a
)
noip.c (encode_single_inet_addr): Make the logic less weird.
author
Mark Wooding
<mdw@distorted.org.uk>
Sat, 9 Jun 2018 14:53:20 +0000
(15:53 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Sat, 9 Jun 2018 14:58:23 +0000
(15:58 +0100)
Now it doesn't need to know quite so much about all of the possible
status values.
noip.c
patch
|
blob
|
blame
|
history
diff --git
a/noip.c
b/noip.c
index 9dfc6c3be3da1641ef67eee0e59362bcafda2abd..fea6f742adaac68c2299016c9857b3b31e1c0630 100644
(file)
--- a/
noip.c
+++ b/
noip.c
@@
-734,9
+734,9
@@
static int encode_single_inet_addr(const struct sockaddr *sa,
snprintf(sun->sun_path, sizeof(sun->sun_path), "%s/%s", sockdir,
present_sockaddr(sa, 0, buf, sizeof(buf)));
-
if ((rc = unix_socket_status(sun, quickp)) == USED) return (USED
);
-
else
if (rc == STALE) unlink(sun->sun_path);
- return (
UNUSED
);
+
rc = unix_socket_status(sun, quickp
);
+ if (rc == STALE) unlink(sun->sun_path);
+ return (
rc
);
}
/* Convert the IP address SA to a Unix-domain address SUN. Fail if the