From: Harsha Sharma <harshasharmaiitr@gmail.com>
To: pablo@netfilter.org
Cc: netfilter-devel@vger.kernel.org,
outreachy-kernel@googlegroups.com,
Harsha Sharma <harshasharmaiitr@gmail.com>
Subject: [PATCH] datatype: Change "%Zx" to "%zx" and "%Zu" to "%zu"
Date: Mon, 9 Oct 2017 02:00:36 +0530 [thread overview]
Message-ID: <20171008203036.24619-1-harshasharmaiitr@gmail.com> (raw)
Use "%zx" and "%zu" over "%Zx" and "%Zu" respectively as "%Zx" and "%Zu"
is non-standard C.
Signed-off-by: Harsha Sharma <harshasharmaiitr@gmail.com>
---
src/datatype.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/datatype.c b/src/datatype.c
index 94b1224..34dda84 100644
--- a/src/datatype.c
+++ b/src/datatype.c
@@ -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,
--
2.11.0
reply other threads:[~2017-10-08 20:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171008203036.24619-1-harshasharmaiitr@gmail.com \
--to=harshasharmaiitr@gmail.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=outreachy-kernel@googlegroups.com \
--cc=pablo@netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).