Merged revisions 78184 via svnmerge from
authorRussell Bryant <russell@russellbryant.com>
Mon, 6 Aug 2007 16:51:30 +0000 (16:51 +0000)
committerRussell Bryant <russell@russellbryant.com>
Mon, 6 Aug 2007 16:51:30 +0000 (16:51 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r78184 | russell | 2007-08-06 11:50:54 -0500 (Mon, 06 Aug 2007) | 5 lines

Fix the return value of AST_LIST_REMOVE().  This shouldn't be causing any
problems, though, because the only code that uses the return value only checks
to see if it is NULL.
(closes issue #10390, pointed out by mihai)

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78185 65c4cc65-6c06-0410-ace0-fbb531ad65f3

include/asterisk/linkedlists.h

index 257a468..b503f5b 100644 (file)
@@ -748,7 +748,7 @@ struct {                                                            \
                while (curelm && (curelm->field.next != (elm)))                 \
                        curelm = curelm->field.next;                    \
                if (curelm) { \
-                       __res = curelm; \
+                       __res = (elm); \
                        curelm->field.next = (elm)->field.next;                 \
                        if ((head)->last == (elm))                              \
                                (head)->last = curelm;                          \