From 0a7e52b2ed359acaa07a883ba50793ab73083a7c Mon Sep 17 00:00:00 2001 From: Vladimir Serbinenko Date: Fri, 25 Oct 2013 22:58:19 +0200 Subject: [PATCH] * grub-core/normal/cmdline.c (grub_history_get): Make argument into unsigned. (grub_history_replace): Likewise. --- ChangeLog | 6 ++++++ grub-core/normal/cmdline.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2cc67a772..b4b30ef73 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2013-10-25 Vladimir Serbinenko + + * grub-core/normal/cmdline.c (grub_history_get): Make argument into + unsigned. + (grub_history_replace): Likewise. + 2013-10-25 Vladimir Serbinenko * grub-core/disk/raid6_recover.c: Use unsigned arithmetics when diff --git a/grub-core/normal/cmdline.c b/grub-core/normal/cmdline.c index 03e84d5d4..f7cd115d7 100644 --- a/grub-core/normal/cmdline.c +++ b/grub-core/normal/cmdline.c @@ -92,7 +92,7 @@ grub_set_history (int newsize) /* Get the entry POS from the history where `0' is the newest entry. */ static grub_uint32_t * -grub_history_get (int pos) +grub_history_get (unsigned pos) { pos = (hist_pos + pos) % hist_size; return hist_lines[pos]; @@ -154,7 +154,7 @@ grub_history_add (grub_uint32_t *s, grub_size_t len) /* Replace the history entry on position POS with the string S. */ static void -grub_history_replace (int pos, grub_uint32_t *s, grub_size_t len) +grub_history_replace (unsigned pos, grub_uint32_t *s, grub_size_t len) { grub_history_set ((hist_pos + pos) % hist_size, s, len); }