Use break instead of extra variable.

Change-Id: I7ac9217c7075759e7b33a90e95fd2425742900f1
Reviewed-on: http://review.couchbase.org/43811
Tested-by: Aliaksey Artamonau <aliaksiej.artamonau@gmail.com>
Reviewed-by: Aliaksey Kandratsenka <alkondratenko@gmail.com>