Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 10 Feb 2018 14:45:29 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r329102 - head/lib/libcompat/4.3
Message-ID:  <201802101445.w1AEjTlI037606@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802101445.w1AEjTlI037606>