bug-libtool
[Top][All Lists]
Advanced

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

Re: slist_foreach bogosity


From: Bob Friesenhahn
Subject: Re: slist_foreach bogosity
Date: Mon, 27 Sep 2004 12:45:16 -0500 (CDT)

This patch looks good to me.

Bob

On Mon, 27 Sep 2004, Ralf Wildenhues wrote:

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;


_______________________________________________
Bug-libtool mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/bug-libtool


======================================
Bob Friesenhahn
address@hidden
http://www.simplesystems.org/users/bfriesen




reply via email to

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