[haiku-commits] Re: haiku: hrev48648 - in src/add-ons/kernel: network/datalink_protocols/arp file_cache

  • From: Oliver Tappe <zooey@xxxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 10 Jan 2015 11:22:38 +0100

Hi,

On 2015-01-10 at 10:48:08 [+0100], pulkomandy@xxxxxxxxxxxxx wrote:
> hrev48648 adds 2 changesets to branch 'master'
> old head: 740112693b62765574866f9bd431720edd69986b
> new head: d1644d7e4fdc62dd671d792278f744d476a110df
> overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=d1644d7+%5E7401126
[ ... ]
> diff --git a/src/add-ons/kernel/network/datalink_protocols/arp/arp.cpp 
> b/src/add-ons/kernel/network/datalink_protocols/arp/arp.cpp
> index fac074f..fe58de1 100644
> --- a/src/add-ons/kernel/network/datalink_protocols/arp/arp.cpp
> +++ b/src/add-ons/kernel/network/datalink_protocols/arp/arp.cpp
> @@ -885,14 +885,12 @@ arp_control(const char *subsystem, uint32 function, 
> void *buffer,
>  
>              arp_entry *entry = NULL;
>              uint32 i = 0;
> -            while (iterator.HasNext() && i < control.cookie) {
> +            for (uint32 i = 0; i <= control.cookie; i++) {
> +                if (!iterator.HasNext())
> +                    return B_ENTRY_NOT_FOUND;

Now there are two variables named 'i', was this intended?

cheers,
        Oliver

Other related posts: