rem: for(int32 index = 0; index < devices.CountItems(); index++) { device = devices.ItemAt(index);
add: for(int32 index = 0; index < devices->CountItems(); index++) { device = devices->ItemAt(index);
context: pppoe_input(struct mbuf *packet){	if(!packet)		return;		ifnet *sourceIfnet = packet->m_pkthdr.rcvif;	pppoe_header *header = mtod(packet, pppoe_header*);	PPPoEDevice *device;		LockerHelper locker(lock);		for(int32 index = 0; index < devices.CountItems(); index++) {		device = devices.ItemAt(index);				if(device && device->EthernetIfnet() == sourceIfnet) {			if(header->ethernetHeader.ether_type == ETHERTYPE_PPPOE					&& header->sessionID == device->SessionID()) {				device->Receive(packet);				return;			} else if(header->ethernetHeader.ether_type == ETHERTYPE_PPPOE					&& header->code != PADI && header->code != PADR					&& !device->IsDown()) {				DiscoveryPacket discovery(packet);				pppoe_tag *tag = discovery.TagWithType(HOST_UNIQ);				if(tag && tag->length == 4						&& *((uint32*)tag->data) == device->HostUniq()) {					device->Receive(packet);					return;				}			}		}	}		printf("PPPoE: No device found for packet from: %s\n", sourceIfnet->if_name);	m_freem(packet);}