aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2005-12-17 01:02:29 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2005-12-17 01:02:29 +0000
commitbeea1a6754ed79f483c3fec7804cd9599673d56b (patch)
tree927a3c44aaa717fe25def9d1fdcc8123a5ad072d
parent9b52b60ef240448f55733b3572d47b58a48c6135 (diff)
We want to check the previous value, not the current value (which was just changed).
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@7508 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--include/asterisk/linkedlists.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/asterisk/linkedlists.h b/include/asterisk/linkedlists.h
index 8dbd5dd5c..ef54ed444 100644
--- a/include/asterisk/linkedlists.h
+++ b/include/asterisk/linkedlists.h
@@ -381,7 +381,8 @@ struct { \
used to link entries of this list together.
Note: The link field in the appended entry is \b not modified, so if it is
- actually the head of a list itself, the entire list will be appended.
+ actually the head of a list itself, the entire list will be appended
+ temporarily (until the next AST_LIST_INSERT_TAIL is performed).
*/
#define AST_LIST_INSERT_TAIL(head, elm, field) do { \
if (!(head)->first) { \
@@ -431,7 +432,7 @@ struct { \
while (curelm->field.next != (elm)) \
curelm = curelm->field.next; \
curelm->field.next = (elm)->field.next; \
- if ((head)->last == curelm->field.next) \
+ if ((head)->last == (elm)) \
(head)->last = curelm; \
} \
} while (0)