rem: while (list) { if (list->id == (int)gid) { last_out = (gid_t)list->id2; return last_out; } list = list->next;
add: for (list = gidlist; list; list = list->next) { if (list->id == (int)gid) return last_out = (gid_t)list->id2;
context: static gid_t match_gid(gid_t gid){	static gid_t last_in = GID_NONE, last_out = GID_NONE;	struct idlist *list = gidlist;	if (gid == last_in)		return last_out;	last_in = gid;	while (list) {		if (list->id == (int)gid) {			last_out = (gid_t)list->id2;			return last_out;		}		list = list->next;	}		if (am_root || is_in_group(gid))		last_out = gid;	else		last_out = GID_NONE;	return last_out;}