From 0ed20b78b7c7795d0688d3b38a3890d8721b1be6 Mon Sep 17 00:00:00 2001 From: "Pedro F. Giffuni" Date: Sat, 10 Feb 2018 14:45:29 +0000 Subject: [PATCH] libcompat: Use %hu for unsigned shorts. Obtained from: DragonFlyBSD (git 82e1476a) --- lib/libcompat/4.3/rexec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libcompat/4.3/rexec.c b/lib/libcompat/4.3/rexec.c index a6599209605e..edbe6fcc5f88 100644 --- a/lib/libcompat/4.3/rexec.c +++ b/lib/libcompat/4.3/rexec.c @@ -356,7 +356,7 @@ rexec(ahost, rport, name, pass, cmd, fd2p) goto bad; } port = ntohs((u_short)sin2.sin_port); - (void) sprintf(num, "%u", port); + (void) sprintf(num, "%hu", port); (void) write(s, num, strlen(num)+1); { int len = sizeof (from); s3 = accept(s2, (struct sockaddr *)&from, &len);