]> git.wh0rd.org - fontconfig.git/blobdiff - src/fcdir.c
delete unused variables
[fontconfig.git] / src / fcdir.c
index 359446c3682772b4446f12ff7c7b4c25bbb2ec09..d8b094fbc7eec96a9705117993922002b20883c9 100644 (file)
@@ -65,7 +65,7 @@ FcFileScanFontConfig (FcFontSet               *set,
        /*
         * Edit pattern with user-defined rules
         */
-       if (font && config && !FcConfigSubstituteWithPat (config, font, NULL, FcMatchScan))
+       if (font && config && !FcConfigSubstitute (config, font, FcMatchScan))
        {
            FcPatternDestroy (font);
            font = NULL;
@@ -75,7 +75,7 @@ FcFileScanFontConfig (FcFontSet               *set,
        /*
         * Add the font
         */
-       if (font && (!config || FcConfigAcceptFont (config, font)))
+       if (font)
        {
            if (FcDebug() & FC_DBG_SCANV)
            {
@@ -235,7 +235,6 @@ FcCache *
 FcDirCacheScan (const FcChar8 *dir, FcConfig *config)
 {
     FcStrSet           *dirs;
-    FcBool             ret = FcTrue;
     FcFontSet          *set;
     FcCache            *cache = NULL;
     struct stat                dir_stat;
@@ -244,44 +243,28 @@ FcDirCacheScan (const FcChar8 *dir, FcConfig *config)
        printf ("cache scan dir %s\n", dir);
 
     if (FcStat (dir, &dir_stat) < 0)
-    {
-       if (errno != ENOENT)
-           ret = FcFalse;
        goto bail;
-    }
 
     set = FcFontSetCreate();
     if (!set)
-    {
-       ret = FcFalse;
        goto bail;
-    }
 
     dirs = FcStrSetCreate ();
     if (!dirs)
-    {
-       ret = FcFalse;
        goto bail1;
-    }
 
     /*
      * Scan the dir
      */
     if (!FcDirScanConfig (set, dirs, NULL, dir, FcTrue, config))
-    {
-       ret = FcFalse;
        goto bail2;
-    }
 
     /*
      * Build the cache object
      */
     cache = FcDirCacheBuild (set, dir, &dir_stat, dirs);
     if (!cache)
-    {
-       ret = FcFalse;
        goto bail2;
-    }
 
     /*
      * Write out the cache file, ignoring any troubles
@@ -304,9 +287,6 @@ FcDirCacheRead (const FcChar8 *dir, FcBool force, FcConfig *config)
 {
     FcCache            *cache = NULL;
 
-    if (config && !FcConfigAcceptFilename (config, dir))
-       return NULL;
-
     /* Try to use existing cache file */
     if (!force)
        cache = FcDirCacheLoad (dir, config, NULL);