Small optimization. 

Used two if statements, both of which just broke a loop. Just threw them together with ||. This will be slightly faster, and will still prevent -1 from being sent to new_incoming, since || is evaluated in order.