svn commit: r329102 - head/lib/libcompat/4.3

Pedro F. Giffuni pfg at FreeBSD.org
Sat Feb 10 14:45:30 UTC 2018


Author: pfg
Date: Sat Feb 10 14:45:29 2018
New Revision: 329102
URL: https://svnweb.freebsd.org/changeset/base/329102

Log:
  libcompat: Use %hu for unsigned shorts.
  
  Obtained from:	DragonFlyBSD (git  82e1476a)

Modified:
  head/lib/libcompat/4.3/rexec.c

Modified: head/lib/libcompat/4.3/rexec.c
==============================================================================
--- head/lib/libcompat/4.3/rexec.c	Sat Feb 10 10:13:17 2018	(r329101)
+++ head/lib/libcompat/4.3/rexec.c	Sat Feb 10 14:45:29 2018	(r329102)
@@ -356,7 +356,7 @@ retry:
 			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);


More information about the svn-src-head mailing list