fontconfig: Branch 'main'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 src/fcfreetype.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit ce00010b1fadffccd2ba94d2b1932d4f5ff38f8e
Author: Ben Wagner <bungeman@xxxxxxxxxxxx>
Date:   Mon Dec 6 16:52:14 2021 -0500

    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.

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);



[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux