commit 506cef0e24f7b12010060d46399b2e0f0b4483ea
Author: Michael Bruck <mbruck@digenius.de>
Date:   Thu May 21 03:43:12 2009 +0200

    -jtag.c, interface_jtag_add_ir_scan() [2/2]:
    	- retire variable 'found' and use goto instead
    	- add comments on loops

diff --git a/src/jtag/jtag.c b/src/jtag/jtag.c
index ebdd4a3..71ae8ba 100644
--- a/src/jtag/jtag.c
+++ b/src/jtag/jtag.c
@@ -641,14 +641,14 @@ int MINIDRIVER(interface_jtag_add_ir_scan)(int in_num_fields, const scan_field_t
 
 	for (jtag_tap_t * tap = jtag_NextEnabledTap(NULL); tap != NULL; tap = jtag_NextEnabledTap(tap))
 	{
-		int found = 0;
+		/* search the input field list for fields for the current TAP */
 
 		for (int j = 0; j < in_num_fields; j++)
 		{
 			if (tap != in_fields[j].tap)
 				continue;
 
-			found = 1;
+			/* if TAP is listed in input fields, copy the value */
 
 			tap->bypass = 0;
 
@@ -656,20 +656,20 @@ int MINIDRIVER(interface_jtag_add_ir_scan)(int in_num_fields, const scan_field_t
 
 			cmd_queue_scan_field_clone(field, in_fields + j);
 
-			break;
+			goto not_bypass;
 		}
 
-		if (!found)
-		{
-			/* if a TAP isn't listed in input fields, set it to BYPASS */
-			tap->bypass = 1;
+		/* if a TAP isn't listed in input fields, set it to BYPASS */
 
-			field->tap			= tap;
-			field->num_bits		= tap->ir_length;
-			field->out_value	= buf_set_ones(cmd_queue_alloc(CEIL(tap->ir_length, 8)), tap->ir_length);
-			field->in_value		= NULL; /* do not collect input for tap's in bypass */
-		}
+		tap->bypass					= 1;
+
+		field->tap					= tap;
+		field->num_bits				= tap->ir_length;
+		field->out_value			= buf_set_ones(cmd_queue_alloc(CEIL(tap->ir_length, 8)), tap->ir_length);
+		field->in_value				= NULL;
 
+	not_bypass:;
+	
 		/* update device information */
 		buf_cpy(field->out_value, tap->cur_instr, tap->ir_length);
 
