We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1b6c40b commit 0482940Copy full SHA for 0482940
1 file changed
ext/testcase.c
@@ -1826,14 +1826,12 @@ testcase_mangle_repo_names(Pool *pool)
1826
for (mp = buf; *mp; mp++)
1827
if (*mp == ' ' || *mp == '\t' || *mp == '/')
1828
*mp = '_';
1829
- for (;;)
1830
- {
1831
- for (i = 1; i < repoid; i++)
1832
- if (!strcmp(buf, names[i]))
1833
- break;
1834
- if (i == repoid)
1835
+ for (i = 1; i < repoid; i++)
+ {
+ if (!names[i] || strcmp(buf, names[i]) != 0)
+ continue;
1836
sprintf(mp, "_%d", mangle++);
+ i = 0; /* restart conflict check */
1837
}
1838
names[repoid] = buf;
1839
0 commit comments