(empty log message)
@@ -156,13 +156,10 @@ | ||
156 | 156 | int i; |
157 | 157 | for (i = 0; cases[i].name != 0; i++) { |
158 | 158 | if (strcmp(cases[i].name, input_str) == 0) { |
159 | - break; | |
159 | + return i; | |
160 | 160 | } |
161 | 161 | } |
162 | - if (cases[i].name == 0) { | |
163 | - return -1; | |
164 | - } | |
165 | - return i; | |
162 | + return -1; | |
166 | 163 | } |
167 | 164 | |
168 | 165 | static int get_ncases(const TestCase *cases) |
@@ -210,13 +207,10 @@ | ||
210 | 207 | int i; |
211 | 208 | for (i = 0; suites[i].name != 0; i++) { |
212 | 209 | if (strcmp(suites[i].name, input_str) == 0) { |
213 | - break; | |
210 | + return i; | |
214 | 211 | } |
215 | 212 | } |
216 | - if (suites[i].name == 0) { | |
217 | - return -1; | |
218 | - } | |
219 | - return i; | |
213 | + return -1; | |
220 | 214 | } |
221 | 215 | |
222 | 216 | static int get_nsuites(const TestSuite *suites) |