From patchwork Sun Oct 8 20:30:36 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harsha Sharma X-Patchwork-Id: 823034 X-Patchwork-Delegate: pablo@netfilter.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netfilter-devel-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="H7LGwF8x"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3y9FSB0VW8z9t2l for ; Mon, 9 Oct 2017 07:32:58 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751537AbdJHUc4 (ORCPT ); Sun, 8 Oct 2017 16:32:56 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:34308 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751496AbdJHUc4 (ORCPT ); Sun, 8 Oct 2017 16:32:56 -0400 Received: by mail-pf0-f194.google.com with SMTP id b85so2532377pfj.1 for ; Sun, 08 Oct 2017 13:32:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=loALiGG8VRNTach0ES1mXWVO+3MZRTdOPNl6ZwcY47E=; b=H7LGwF8xWZn7ZnKN8zzv8opzS55Oy+rAhjMI6Y3g8pfJv27OZMKs6Q6ur++VKczv0F xVYsqZrYJLa6kw6dA+xfCe5hamiosjTfJwoKVB4hC+A9jO/kbRbjsN0X/zzrt0f5L2KU BJVe2jUFf+YeUdtW/RKuegeSbwTMsTPhuY4F92oQjP7xSYapamJzx8qJNIwbKrcaYan8 4eiYD4QeXi274/zugLV50D04WqhFoO5jIPpwH2rptRt/N1pk8gbv13LTOFKr61KA3e+l 1+Z8ZJS0R5jGxvw1QdhwKBfT0ZcN3q5IY/USs1C16hvx94p5GqLZOzc2RFiZnhn+7Btd EVjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=loALiGG8VRNTach0ES1mXWVO+3MZRTdOPNl6ZwcY47E=; b=L89jkyvQqQiHETh8uXYYzDZXpnby2KkrOsTEsINAqWSUdDj4nWsK07spN7H+bGsoTw 6hj31RNaK41qiGV5ulHW+9WO/iaxKuSj83bWzASocssKuIZHUWPB9ERH1Jzi1lBNKbX6 vguifNgRpQ7lNdByL8wWgq1mWp21vE2W4yCHljUwOdxdhnnfWY9Bh3CF1tamzbo8PE5j tMhf2Ifz7dst/r6RkjiEqadPXZAJqAX6yv2tfYDd75CwxjaoS40rCuQ9AcawO9UYBzg6 uYBtGTNQK5gLKJ2Rv6wqUjjppnsiCtp6h5U0BWEjTr3C/HQFjxs1Ca/Q0xgI8D96uHv6 zXjQ== X-Gm-Message-State: AMCzsaVHWwxNehAktjaYcSxeje1buL0lUh1fZmtC8xojMmTuy9UlNVcg /q51eGwV772A5xCNQGuW4II= X-Google-Smtp-Source: AOwi7QAOBbFpdeXJcV653/L9YCuX0PUw2P7omPdvboVZLGXvCypYu/Zb2zZXQyU7YbJ3INRjM3hI8w== X-Received: by 10.101.80.133 with SMTP id r5mr7328978pgp.183.1507494775831; Sun, 08 Oct 2017 13:32:55 -0700 (PDT) Received: from localhost.localdomain ([103.37.201.27]) by smtp.gmail.com with ESMTPSA id p14sm11278871pgr.51.2017.10.08.13.32.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 08 Oct 2017 13:32:55 -0700 (PDT) From: Harsha Sharma To: pablo@netfilter.org Cc: netfilter-devel@vger.kernel.org, outreachy-kernel@googlegroups.com, Harsha Sharma Subject: [PATCH] datatype: Change "%Zx" to "%zx" and "%Zu" to "%zu" Date: Mon, 9 Oct 2017 02:00:36 +0530 Message-Id: <20171008203036.24619-1-harshasharmaiitr@gmail.com> X-Mailer: git-send-email 2.11.0 Sender: netfilter-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netfilter-devel@vger.kernel.org Use "%zx" and "%zu" over "%Zx" and "%Zu" respectively as "%Zx" and "%Zu" is non-standard C. Signed-off-by: Harsha Sharma --- 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,