bug-libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

slist_foreach bogosity


From: Ralf Wildenhues
Subject: slist_foreach bogosity
Date: Mon, 27 Sep 2004 19:42:22 +0200
User-agent: Mutt/1.4.1i

I think it's a better idea to actually return what the result is :)

Regards,
Ralf

2004-09-27  Ralf Wildenhues <address@hidden>

        * libltdl/slist.c (slist_foreach): result was declared as
        inner variable, shadowing the actually returned value.


Index: libltdl/slist.c
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/slist.c,v
retrieving revision 1.4
diff -u -r1.4 slist.c
--- libltdl/slist.c     3 Sep 2004 01:31:58 -0000       1.4
+++ libltdl/slist.c     27 Sep 2004 18:56:03 -0000
@@ -236,12 +236,12 @@
 {
   void *result = 0;
 
   assert (foreach);
 
   while (slist)
     {
       SList *next = slist->next;
-      void *result = (*foreach) (slist, userdata);
+      result = (*foreach) (slist, userdata);
 
       if (result)
        break;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]