(save_def_or_dec): Correct typo in change of Nov 23. Make
authorrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 24 Nov 1993 19:33:10 +0000 (19:33 +0000)
committerrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 24 Nov 1993 19:33:10 +0000 (19:33 +0000)
sure pointers within def_dec_p are valid before it is freed.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6156 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/protoize.c

index 5cff35d..f3b1307 100644 (file)
@@ -1715,8 +1715,12 @@ save_def_or_dec (l, is_syscalls)
 
     p--;
 
+#ifndef UNPROTOIZE
+    def_dec_p->f_list_chain = NULL;
+#endif /* !defined (UNPROTOIZE) */
+
     while (p != ansi_start && (p[-1] == ' ' || p[-1] == '\t')) p--;
-    if (p[-1] != ')')
+    if (*p != ')')
       {
        free_def_dec (def_dec_p);
        return;
@@ -1728,10 +1732,6 @@ save_def_or_dec (l, is_syscalls)
 
   def_dec_p->f_list_count = 0;
 
-#ifndef UNPROTOIZE
-  def_dec_p->f_list_chain = NULL;
-#endif /* !defined (UNPROTOIZE) */
-
   for (;;)
     {
       const char *left_paren_p = find_corresponding_lparen (p);