Skip leading whitespace in style name.

Found by Clang-Tidy. The intent seems to have been to skip all leading
whitespace in the 'style' string, but instead this loop was an odd
looking no-op. Remove the 'break' from the loop so that it will
continue until end of string or a non-space character is found.
This commit is contained in:
Ben Wagner 2020-12-04 15:00:08 -05:00
parent 93c93689f5
commit 3d6926380d
1 changed files with 1 additions and 2 deletions

View File

@ -66,8 +66,7 @@ FcPatternAddFullname (FcPattern *pat)
if (FcPatternObjectGetString (pat, FC_STYLE_OBJECT, n, &style) != FcResultMatch)
return FcFalse;
len = strlen ((const char *) style);
for (i = 0; style[i] != 0 && isspace (style[i]); i++)
break;
for (i = 0; style[i] != 0 && isspace (style[i]); i++);
memcpy (style, &style[i], len - i);
FcStrBufInit (&sbuf, NULL, 0);
FcStrBufString (&sbuf, family);