Automated Dust Collection

groundFungus:

for(int i=0;i<NUMBER_OF_TOOLS;i++)

{
if( checkForAmperageChange(i))
{
  activeTool = i;
  exit;
}
if( i!=0)
 {
  if(checkForAmperageChange(0))
  {
    activeTool = 0;
    exit;
  }
}



What do you think that the exit statements do in this snippet?

Find tool and exit loop(). Cute function. I'm thinking this doesn't work very well.

Luckily I can admit that I didn't write it.