libcompat: Use %hu for unsigned shorts.

Obtained from:	DragonFlyBSD (git  82e1476a)
This commit is contained in:
pfg 2018-02-10 14:45:29 +00:00
parent a6619b0d9c
commit 52ce5566a3

View File

@ -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);