]> git.ozlabs.org Git - ppp.git/commitdiff
Clang complained about -Wformat in passing a int for %h in snprintf. Result would...
authorEivind Næss <eivnaes@yahoo.com>
Thu, 23 Sep 2021 14:52:34 +0000 (07:52 -0700)
committerEivind Næss <eivnaes@yahoo.com>
Thu, 23 Sep 2021 14:52:34 +0000 (07:52 -0700)
Signed-off-by: Eivind Næss <eivnaes@yahoo.com>
pppd/plugins/radius/util.c

index 751f819ede511e929b98b490a1154769cd778ee1..4065724926ae44a1a1433a2b0ef25e01e9ec35bc 100644 (file)
@@ -78,7 +78,7 @@ rc_mksid (void)
   snprintf(buf, sizeof(buf), "%08lX%04X%02hX",
           (unsigned long int) time (NULL),
           (unsigned int) getpid (),
-          cnt & 0xFF);
+          (unsigned short) (cnt & 0xFF));
   cnt++;
   return buf;
 }