]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix the return value of AST_LIST_REMOVE(). This shouldn't be causing any
authorRussell Bryant <russell@russellbryant.com>
Mon, 6 Aug 2007 16:50:54 +0000 (16:50 +0000)
committerRussell Bryant <russell@russellbryant.com>
Mon, 6 Aug 2007 16:50:54 +0000 (16:50 +0000)
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/branches/1.4@78184 65c4cc65-6c06-0410-ace0-fbb531ad65f3

include/asterisk/linkedlists.h

index 1bf933a141f03df01a209a95d4a4a59e92d172ea..70a5cdcae699dbd8aa6d42c4ab9d3c2052889ad9 100644 (file)
@@ -741,7 +741,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;                          \