Skip to contentSkip to conversation

datatype: Change "%Zx" to "%zx" and "%Zu" to "%zu"

PATCH New Harsha Sharma 1 participant 1 message Oct 8, 2017 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 datatype: Change "%Zx" to "%zx" and "%Zu" to "%zu"

Use "%zx" and "%zu" over "%Zx" and "%Zu" respectively as "%Zx" and "%Zu" is non-standard C.

---
 src/datatype.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
src/datatype.c +4 -4
index 94b1224..34dda84 100644
@@ -239,7 +239,7 @@ void symbol_table_print(const struct symbol_table *tbl,
 
 static void invalid_type_print(const struct expr *expr, struct output_ctx *octx)
 {
-	nft_gmp_print(octx, "0x%Zx [invalid type]", expr->value);
+	nft_gmp_print(octx, "0x%zx [invalid type]", expr->value);
 }
 
 const struct datatype invalid_type = {
@@ -313,14 +313,14 @@ const struct datatype bitmask_type = {
 	.type		= TYPE_BITMASK,
 	.name		= "bitmask",
 	.desc		= "bitmask",
-	.basefmt	= "0x%Zx",
+	.basefmt	= "0x%zx",
 	.basetype	= &integer_type,
 };
 
 static void integer_type_print(const struct expr *expr, struct output_ctx *octx)
 {
 	const struct datatype *dtype = expr->dtype;
-	const char *fmt = "%Zu";
+	const char *fmt = "%zu";
 
 	do {
 		if (dtype->basefmt != NULL) {
@@ -749,7 +749,7 @@ const struct datatype mark_type = {
 	.size		= 4 * BITS_PER_BYTE,
 	.byteorder	= BYTEORDER_HOST_ENDIAN,
 	.basetype	= &integer_type,
-	.basefmt	= "0x%.8Zx",
+	.basefmt	= "0x%.8zx",
 	.print		= mark_type_print,
 	.parse		= mark_type_parse,
 	.flags		= DTYPE_F_PREFIX,
Signature · 1 line
2.11.0