Don't bother with the h (short) modifier. The predicated use of bswap16

confuses the type tracking in clang and the use here is not portable
anyway, since it assumes short == int16_t.
This commit is contained in:
joerg 2014-01-03 20:26:45 +00:00
parent 7357087b77
commit ba1a5140ab
2 changed files with 5 additions and 5 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: socktoa.c,v 1.1.1.3 2013/12/27 23:30:48 christos Exp $ */
/* $NetBSD: socktoa.c,v 1.2 2014/01/03 20:26:45 joerg Exp $ */
/*
* socktoa.c socktoa(), sockporttoa(), and sock_hash()
@ -93,8 +93,8 @@ sockporttoa(
LIB_GETBUF(buf);
snprintf(buf, LIB_BUFLENGTH,
(IS_IPV6(sock))
? "[%s]:%hu"
: "%s:%hu",
? "[%s]:%u"
: "%s:%u",
atext, SRCPORT(sock));
errno = saved_errno;

View File

@ -1,4 +1,4 @@
/* $NetBSD: ntpq-subs.c,v 1.6 2013/12/30 01:34:22 christos Exp $ */
/* $NetBSD: ntpq-subs.c,v 1.7 2014/01/03 20:26:45 joerg Exp $ */
/*
* ntpq-subs.c - subroutines which are called to perform ntpq commands.
@ -3036,7 +3036,7 @@ mrulist(
LFPTOD(&interval, favgint);
favgint /= recent->count;
avgint = (int)(favgint + 0.5);
fprintf(fp, "%6d %6d %4hx %c %d %d %6d %5hu %s\n",
fprintf(fp, "%6d %6d %4hx %c %d %d %6d %5u %s\n",
lstint, avgint, recent->rs,
(RES_KOD & recent->rs)
? 'K'