From c0ae47b31fbdf9729f6ea531d674b93252b1b775 Mon Sep 17 00:00:00 2001 Message-Id: From: Mark Wooding Date: Sat, 9 Jun 2018 15:53:20 +0100 Subject: [PATCH] noip.c (encode_single_inet_addr): Make the logic less weird. Organization: Straylight/Edgeware From: Mark Wooding Now it doesn't need to know quite so much about all of the possible status values. --- noip.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/noip.c b/noip.c index 9dfc6c3..fea6f74 100644 --- 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 -- [mdw]