Patchwork [obvious] Fix fallout from cp/repo.c change

login
register
mail settings
Submitter Michael Matz
Date June 30, 2010, 4:08 p.m.
Message ID <Pine.LNX.4.64.1006301804590.18619@wotan.suse.de>
Download mbox | patch
Permalink /patch/57429/
State New
Headers show

Comments

Michael Matz - June 30, 2010, 4:08 p.m.
Hi,

I wonder how this could have tested okay, I reliably get segfaults for the 
repo testcases as 'val' will be NULL after the vector got iterated 
through.  I've committed this obvious in r161612.


Ciao,
Michael.

Patch

Index: repo.c
===================================================================
--- repo.c      (revision 161611)
+++ repo.c      (working copy)
@@ -269,7 +269,7 @@  finish_repo (void)

   for (ix = VEC_length (tree, pending_repo) - 1;
        VEC_iterate (tree, pending_repo, ix, val);
-       ix--);
+       ix--)
     {
       tree name = DECL_ASSEMBLER_NAME (val);
       char type = IDENTIFIER_REPO_CHOSEN (name) ? 'C' : 'O';