diff --git a/ChangeLog b/ChangeLog index 65f37e7e8..4aa1a239f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2008-07-01 Pavel Roskin + * term/tparm.c (analyze): Always set *popcount. + * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless cast to fix a warning. diff --git a/term/tparm.c b/term/tparm.c index 55955b639..e76cbe723 100644 --- a/term/tparm.c +++ b/term/tparm.c @@ -361,6 +361,8 @@ analyze(const char *string, char *p_is_s[NUM_PARM], int *popcount) const char *cp = string; static char dummy[] = ""; + *popcount = 0; + if (cp == 0) return 0; @@ -371,7 +373,6 @@ analyze(const char *string, char *p_is_s[NUM_PARM], int *popcount) } grub_memset(p_is_s, 0, sizeof(p_is_s[0]) * NUM_PARM); - *popcount = 0; while ((cp - string) < (int) len2) { if (*cp == '%') {