Fix the GPL notices.
[preload-hacks] / noip.c
diff --git a/noip.c b/noip.c
index 9f82e25..804fc8a 100644 (file)
--- a/noip.c
+++ b/noip.c
  * the Free Software Foundation; either version 2 of the License, or (at
  * your option) any later version.
  *
- * Preload-hacks distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
- * more details.
+ * Preload-hacks are distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * for more details.
  *
  * You should have received a copy of the GNU General Public License along
- * with mLib; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place - Suite 330, Boston, MA 02111-1307, USA.
+ * with preload-hacks; if not, write to the Free Software Foundation, Inc.,
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  */
 
 #define _GNU_SOURCE
@@ -841,6 +841,9 @@ int socket(int pf, int ty, int proto)
       pf = PF_UNIX;
       proto = 0;
     case PF_UNIX:
+#ifdef PF_NETLINK
+    case PF_NETLINK:
+#endif
       return real_socket(pf, ty, proto);
     default:
       errno = EAFNOSUPPORT;
@@ -879,14 +882,12 @@ int bind(int sk, const struct sockaddr *sa, socklen_t len)
 int connect(int sk, const struct sockaddr *sa, socklen_t len)
 {
   struct sockaddr_un sun;
-  int fixup_p = 0;
   int rc;
 
   switch (sa->sa_family) {
     case AF_INET:
       PRESERVING_ERRNO({
        do_implicit_bind(sk, &sa, &len, &sun);
-       fixup_p = 1;
       });
       rc = real_connect(sk, sa, len);
       if (rc < 0) {
@@ -1105,7 +1106,7 @@ static void get_local_ipaddrs(void)
 
 /* Print the given message to standard error.  Avoids stdio. */
 static void printerr(const char *p)
-  { int hunoz; hunoz = write(STDERR_FILENO, p, strlen(p)); }
+  { if (write(STDERR_FILENO, p, strlen(p))) ; }
 
 /* Create the socket directory, being careful about permissions. */
 static void create_sockdir(void)