diff --git a/include/asterisk/linkedlists.h b/include/asterisk/linkedlists.h index 257a4688d0..b503f5b757 100644 --- a/include/asterisk/linkedlists.h +++ b/include/asterisk/linkedlists.h @@ -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; \