libtool-patches
[Top][All Lists]
Advanced

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

Re: slist_foreach bogosity


From: Ralf Wildenhues
Subject: Re: slist_foreach bogosity
Date: Mon, 27 Sep 2004 23:56:44 +0200
User-agent: Mutt/1.5.6+20040722i

resend to libtool-patches.

* Ralf Wildenhues wrote on Mon, Sep 27, 2004 at 07:42:22PM CEST:
> I think it's a better idea to actually return what the result is :)
> 

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]