Makefile: Cardboard cutout silent rules build.
[preload-hacks] / noip.c
diff --git a/noip.c b/noip.c
index 237bfd0..bcba77f 100644 (file)
--- a/noip.c
+++ b/noip.c
@@ -98,7 +98,7 @@ static aclnode *connect_real,  **connect_tail = &connect_real;
   _(sendto, ssize_t, (int, const void *buf, size_t, int,               \
                      const struct sockaddr *to, socklen_t tolen))      \
   _(recvfrom, ssize_t, (int, void *buf, size_t, int,                   \
-                       struct sockaddr *from, socklen_t *fromlen))     \
+                       struct sockaddr *from, socklen_t *fromlen))     \
   _(sendmsg, ssize_t, (int, const struct msghdr *, int))               \
   _(recvmsg, ssize_t, (int, struct msghdr *, int))                     \
   _(close, int, (int))
@@ -266,7 +266,7 @@ static int unix_socket_status(struct sockaddr_un *sun, int quickp)
   rc = USED;
   if ((fp = fopen("/proc/net/unix", "r")) == 0)
     goto done;
-  fgets(buf, sizeof(buf), fp); /* skip header */
+  if (!fgets(buf, sizeof(buf), fp)) goto done; /* skip header */
   len = strlen(sun->sun_path);
   while (fgets(buf, sizeof(buf), fp)) {
     n = strlen(buf);
@@ -1090,7 +1090,7 @@ static void get_local_ipaddrs(void)
     return;
   for (i = n_local_ipaddrs = 0;
        n_local_ipaddrs < MAX_LOCAL_IPADDRS &&
-         ifn[i].if_name && *ifn[i].if_name;
+        ifn[i].if_name && *ifn[i].if_name;
        i++) {
     strcpy(ifr.ifr_name, ifn[i].if_name);
     if (ioctl(sk, SIOCGIFADDR, &ifr) || ifr.ifr_addr.sa_family != AF_INET)
@@ -1104,7 +1104,8 @@ static void get_local_ipaddrs(void)
 }
 
 /* Print the given message to standard error.  Avoids stdio. */
-static void printerr(const char *p) { write(STDERR_FILENO, p, strlen(p)); }
+static void printerr(const char *p)
+  { int hunoz; hunoz = write(STDERR_FILENO, p, strlen(p)); }
 
 /* Create the socket directory, being careful about permissions. */
 static void create_sockdir(void)