Module Name:    src
Committed By:   martin
Date:           Fri Aug 21 17:51:31 UTC 2020

Modified Files:
        src/usr.sbin/wgconfig: wgconfig.c

Log Message:
Use %zu for size_t


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/wgconfig/wgconfig.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/wgconfig/wgconfig.c
diff -u src/usr.sbin/wgconfig/wgconfig.c:1.3 src/usr.sbin/wgconfig/wgconfig.c:1.4
--- src/usr.sbin/wgconfig/wgconfig.c:1.3	Thu Aug 20 21:34:51 2020
+++ src/usr.sbin/wgconfig/wgconfig.c	Fri Aug 21 17:51:31 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: wgconfig.c,v 1.3 2020/08/20 21:34:51 riastradh Exp $	*/
+/*	$NetBSD: wgconfig.c,v 1.4 2020/08/21 17:51:31 martin Exp $	*/
 
 /*
  * Copyright (C) Ryota Ozaki <[email protected]>
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: wgconfig.c,v 1.3 2020/08/20 21:34:51 riastradh Exp $");
+__RCSID("$NetBSD: wgconfig.c,v 1.4 2020/08/21 17:51:31 martin Exp $");
 
 #include <sys/ioctl.h>
 
@@ -92,7 +92,7 @@ format_key(prop_object_t key_prop)
 	key = prop_data_value(key_prop);
 	key_len = prop_data_size(key_prop);
 	if (key_len != KEY_LEN)
-		errx(EXIT_FAILURE, "invalid key len: %lu", key_len);
+		errx(EXIT_FAILURE, "invalid key len: %zu", key_len);
 	error = b64_ntop(key, key_len, key_b64, KEY_BASE64_LEN + 1);
 	if (error == -1)
 		errx(EXIT_FAILURE, "b64_ntop failed");
@@ -425,7 +425,7 @@ read_key(const char *path, unsigned char
 
 	n = fread(keyb64buf, 1, KEY_BASE64_LEN, fp);
 	if (n != KEY_BASE64_LEN)
-		errx(EXIT_FAILURE, "base64 key len is short: %lu", n);
+		errx(EXIT_FAILURE, "base64 key len is short: %zu", n);
 	keyb64buf[KEY_BASE64_LEN] = '\0';
 
 	base64_decode(keyb64buf, keybuf);

Reply via email to