]> git.wh0rd.org - fontconfig.git/blobdiff - src/fcname.c
Properly convert static charsets to dynamic charsets.
[fontconfig.git] / src / fcname.c
index c6c187adef58aaecd1a5b9dd249744c0dee5471b..a0a84a394237ceb1f83742a1f8175645ab05f0a0 100644 (file)
@@ -342,7 +342,7 @@ FcObjectNeededBytes ()
 int
 FcObjectNeededBytesAlign (void)
 {
-    return __alignof__ (int) + __alignof__ (char);
+    return fc_alignof (int) + fc_alignof (char);
 }
 
 void *
@@ -373,27 +373,19 @@ void *
 FcObjectUnserialize (FcCache * metadata, void *block_ptr)
 {
     int new_biggest;
-    new_biggest = *(int *)block_ptr;
     block_ptr = ALIGN (block_ptr, int);
+    new_biggest = *(int *)block_ptr;
     block_ptr = (int *) block_ptr + 1;
     if (biggest_known_ntypes < new_biggest)
     {
        int i;
        char * bp = (char *)block_ptr;
        FcObjectType * bn;
-       FcObjectTypeList * bnl;
 
        bn = malloc (sizeof (const FcObjectType) * (new_biggest + 1));
        if (!bn)
            return 0;
 
-       bnl = malloc (sizeof (FcObjectTypeList));
-       if (!bnl)
-       {
-           free (bn);
-           return 0;
-       }
-
        for (i = 0; i < new_biggest; i++)
        {
            const FcObjectType * t = FcNameGetObjectType(bp);