rem: if (strncmp(list->uri.s, uri->s, uri->len) == 0)
add: if (str_strcmp(&list->uri, uri) == 0)
context: resource_list_t *resource_list_remove(resource_list_t *list, str *uri){	resource_list_t *head = list;	resource_list_t *last = NULL;	resource_list_t *next = NULL;	while (list) {		if (strncmp(list->uri.s, uri->s, uri->len) == 0)			goto remove;		last = list;		list = list->next;	}	return head; remove:	next = list->next;	if (last)		last->next = next;	if (next)		next->prev = last;	shm_free(list);	if (head == list)		return next;	else		return head;}