]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
If we can't figure out the address type assume it's IPv4
authorDanny Mayer <mayer@ntp.org>
Thu, 22 Jul 2004 04:20:36 +0000 (00:20 -0400)
committerDanny Mayer <mayer@ntp.org>
Thu, 22 Jul 2004 04:20:36 +0000 (00:20 -0400)
bk: 40ff4094Q9NS7vgBAu_SIoqSjNNzhQ

libntp/socktoa.c

index ac86aae7bcdb1a59d1a69ee71225c955a3ac984d..7258b06feeb509657ce7dd95a7b7f7cd43c548f4 100644 (file)
@@ -38,6 +38,7 @@ socktoa(
 
                switch(sock->ss_family) {
 
+               default:
                case AF_INET :
                        inet_ntop(AF_INET, &GET_INADDR(*sock), buffer,
                            LIB_BUFLENGTH);
@@ -46,8 +47,10 @@ socktoa(
                case AF_INET6 :
                        inet_ntop(AF_INET6, &GET_INADDR6(*sock), buffer,
                            LIB_BUFLENGTH);
+#if 0
                default:
                        strcpy(buffer, "unknown");
+#endif
                }
        }
        return buffer;