]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2008-07-01 Pavel Roskin <proski@gnu.org>
authorproski <proski@localhost>
Wed, 2 Jul 2008 00:54:18 +0000 (00:54 +0000)
committerproski <proski@localhost>
Wed, 2 Jul 2008 00:54:18 +0000 (00:54 +0000)
* term/tparm.c (analyze): Always set *popcount.

ChangeLog
term/tparm.c

index 65f37e7e864bd8d6245d1fc6319f7fec01c073ce..4aa1a239f512cac1efc9cb8f4ec002a617399e6b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2008-07-01  Pavel Roskin  <proski@gnu.org>
 
+       * term/tparm.c (analyze): Always set *popcount.
+
        * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
        cast to fix a warning.
 
index 55955b639d817e37c5d91c2fdbbee00dbb1f8037..e76cbe7234581d276d6655f5132cca3f30be9001 100644 (file)
@@ -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 == '%') {