static int poller_resize_items(ZMQ_Poller *poller, int len) {
int old_len = poller->len;
/* make sure new length is atleast as large as items count. */
len = (poller->count <= len) ? len : poller->count;
/* if the new length is the same as the old length, then don't try to resize. */
if(old_len == len) return len;
The way it is now will allow shrinking the items list. Right now the resize function is only called to grow the list when more room is needed, but that might change in the future.
We should use