summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Wagner <bungeman@chromium.org>2021-12-06 16:52:14 -0500
committerBen Wagner <bungeman@chromium.org>2021-12-06 16:55:12 -0500
commitce00010b1fadffccd2ba94d2b1932d4f5ff38f8e (patch)
tree242436447eac765cfca1cd904444b56f663993f5
parent8d3425b8b80bd661efe6763bab508af2d8a265ef (diff)
downloadfontconfig-ce00010b1fadffccd2ba94d2b1932d4f5ff38f8e.tar.gz
Actually skip leading spaces in style name
Because the loop body is just 'break' the loop never loops and at most one leading space is skipped. Remove the body to allow the loop to continue. Found with ClangTidy.
-rw-r--r--src/fcfreetype.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/fcfreetype.c b/src/fcfreetype.c
index c477774..b6bfaca 100644
--- a/src/fcfreetype.c
+++ b/src/fcfreetype.c
@@ -1717,8 +1717,7 @@ FcFreeTypeQueryFaceInternal (const FT_Face face,
if (FcPatternObjectGetString (pat, FC_STYLE_OBJECT, n, &style) != FcResultMatch)
goto bail1;
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);