From: Danny Mayer Date: Thu, 22 Jul 2004 04:20:36 +0000 (-0400) Subject: If we can't figure out the address type assume it's IPv4 X-Git-Tag: NTP_4_2_3~156^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ca955cf17a23019659cb05aabe7478c2e392df05;p=thirdparty%2Fntp.git If we can't figure out the address type assume it's IPv4 bk: 40ff4094Q9NS7vgBAu_SIoqSjNNzhQ --- diff --git a/libntp/socktoa.c b/libntp/socktoa.c index ac86aae7bc..7258b06fee 100644 --- a/libntp/socktoa.c +++ b/libntp/socktoa.c @@ -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;