rem: prev = ptr;
context: int clean_location(location_t* _l, db_con_t* _c, time_t _t){	contact_t* ptr, *prev, *tmp;#ifdef PARANOID	if (!_l) {		ERR("Invalid parameter value");		return FALSE;	}#endif	ptr = _l->contacts;	prev = NULL;	while(ptr) {	        DBG("Checking entry: \"%s\"", _l->user.s);		if (ptr->expires < _t) {			DBG("Contact %s,%s expired, removing", ptr->aor->s, ptr->c.s);			if (_c) {				if (db_remove_contact(_c, ptr) == FALSE) {					ERR("Error while removing contact from database");					return FALSE;				}				DBG("Contact removed from database");			}			if (prev) {				prev->next = ptr->next;			} else {				_l->contacts = ptr->next;			}			tmp = ptr;			ptr = ptr->next;			free_contact(tmp);			DBG("Contact removed from cache\n");		} else {			DBG("Contact is still fresh");			ptr = ptr->next;			prev = ptr;		}	}	return TRUE;}