diff --git a/include/asterisk/linkedlists.h b/include/asterisk/linkedlists.h index 1bf933a141..70a5cdcae6 100644 --- a/include/asterisk/linkedlists.h +++ b/include/asterisk/linkedlists.h @@ -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; \