From 40f290606de039eda1f4c2be6cc27efb3d74a35b Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Fri, 25 Oct 2013 20:26:27 +0200 Subject: [PATCH] * grub-core/net/dns.c (hash): Use unsigned arithmetic. --- ChangeLog | 4 ++++ grub-core/net/dns.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 1a01bf70b..62b2db386 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2013-10-25 Vladimir Serbinenko + + * grub-core/net/dns.c (hash): Use unsigned arithmetic. + 2013-10-25 Vladimir Serbinenko * grub-core/io/gzio.c (test_zlib_header): Use undigned modulo rather diff --git a/grub-core/net/dns.c b/grub-core/net/dns.c index 0c1da759a..de649cfba 100644 --- a/grub-core/net/dns.c +++ b/grub-core/net/dns.c @@ -114,7 +114,7 @@ struct recv_data static inline int hash (const char *str) { - int v = 0, xn = 1; + unsigned v = 0, xn = 1; const char *ptr; for (ptr = str; *ptr; ) {