summaryrefslogtreecommitdiffstats
path: root/scripts/genksyms
diff options
context:
space:
mode:
authorJesper Juhl <jj@chaosbits.net>2011-07-12 00:32:04 +0200
committerMichal Marek <mmarek@suse.cz>2011-07-25 14:55:17 +0200
commit1ae14703e76de49e6116296f3b20925f491dbb16 (patch)
treeeab1c037d4b2f66f7338c806a61e9c69f6c737c8 /scripts/genksyms
parent0ff35771fc7a96a2244f38573b6d56199ec75056 (diff)
downloadlinux-stable-1ae14703e76de49e6116296f3b20925f491dbb16.tar.gz
linux-stable-1ae14703e76de49e6116296f3b20925f491dbb16.tar.bz2
linux-stable-1ae14703e76de49e6116296f3b20925f491dbb16.zip
genksyms: Use same type in loop comparison
The ARRAY_SIZE macro in scripts/genksyms/genksyms.c returns a value of type size_t. That value is being compared to a variable of type int in a loop in read_node(). Change the int variable to size_t type as well, so we don't do signed vs unsigned type comparisons with all the potential promotion/sign extension trouble that can cause (also silences compiler warnings at high levels of warnings). Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Michal Marek <mmarek@suse.cz>
Diffstat (limited to 'scripts/genksyms')
-rw-r--r--scripts/genksyms/genksyms.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/genksyms/genksyms.c b/scripts/genksyms/genksyms.c
index f9e75531ea03..6d3fda0ce2ae 100644
--- a/scripts/genksyms/genksyms.c
+++ b/scripts/genksyms/genksyms.c
@@ -448,7 +448,7 @@ static struct string_list *read_node(FILE *f)
node.string = buffer;
if (node.string[1] == '#') {
- int n;
+ size_t n;
for (n = 0; n < ARRAY_SIZE(symbol_types); n++) {
if (node.string[0] == symbol_types[n].n) {