All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: linux-sparse@vger.kernel.org
Cc: Christopher Li <sparse@chrisli.org>,
	Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Subject: [PATCH 1/2] cclass: char is wide enough
Date: Tue, 19 Sep 2017 04:55:59 +0200	[thread overview]
Message-ID: <20170919025600.11900-2-luc.vanoostenryck@gmail.com> (raw)
In-Reply-To: <20170919025600.11900-1-luc.vanoostenryck@gmail.com>

The table for character classes is declared as 'long cclass[]'
but there is no more reasons for such a wide type, 'int', or even
'char' is enough here.

Change this to use 'char' instead of 'long'.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 tokenize.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tokenize.c b/tokenize.c
index 99b958035..7e68cf1ee 100644
--- a/tokenize.c
+++ b/tokenize.c
@@ -483,7 +483,7 @@ enum {
 	Quote = 64,
 };
 
-static const long cclass[257] = {
+static const char cclass[257] = {
 	['0' + 1 ... '7' + 1] = Digit | Hex,	/* \<octal> */
 	['8' + 1 ... '9' + 1] = Digit | Hex,
 	['A' + 1 ... 'D' + 1] = Letter | Hex,
-- 
2.14.0


  reply	other threads:[~2017-09-19  2:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-19  2:55 [PATCH 0/2] cleanup of cclass[] Luc Van Oostenryck
2017-09-19  2:55 ` Luc Van Oostenryck [this message]
2017-09-19  2:56 ` [PATCH 2/2] cclass: cleanup Luc Van Oostenryck

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=20170919025600.11900-2-luc.vanoostenryck@gmail.com \
    --to=luc.vanoostenryck@gmail.com \
    --cc=linux-sparse@vger.kernel.org \
    --cc=sparse@chrisli.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.