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);
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to