aboutsummaryrefslogtreecommitdiff
path: root/fontconfig
diff options
context:
space:
mode:
Diffstat (limited to 'fontconfig')
-rw-r--r--fontconfig/fc-cache/fc-cache.c7
-rw-r--r--fontconfig/src/fccfg.c2
-rw-r--r--fontconfig/src/fcstat.c5
-rw-r--r--fontconfig/src/fcstr.c2
-rw-r--r--fontconfig/src/fcxml.c1
5 files changed, 7 insertions, 10 deletions
diff --git a/fontconfig/fc-cache/fc-cache.c b/fontconfig/fc-cache/fc-cache.c
index 9fb383be0..220609604 100644
--- a/fontconfig/fc-cache/fc-cache.c
+++ b/fontconfig/fc-cache/fc-cache.c
@@ -138,13 +138,6 @@ scanDirs (FcStrList *list, FcConfig *config, FcBool force, FcBool really_force,
fflush (stdout);
}
- if (!dir)
- {
- if (verbose)
- printf ("skipping, no such directory\n");
- continue;
- }
-
if (FcStrSetMember (processed_dirs, dir))
{
if (verbose)
diff --git a/fontconfig/src/fccfg.c b/fontconfig/src/fccfg.c
index 45b486945..f94f0e051 100644
--- a/fontconfig/src/fccfg.c
+++ b/fontconfig/src/fccfg.c
@@ -398,7 +398,7 @@ FcConfigSetCurrent (FcConfig *config)
if (config == _fcConfig)
return FcTrue;
- if (!config->fonts)
+ if (!config->fonts[FcSetSystem])
if (!FcConfigBuildFonts (config))
return FcFalse;
diff --git a/fontconfig/src/fcstat.c b/fontconfig/src/fcstat.c
index d8663d036..d4431e00e 100644
--- a/fontconfig/src/fcstat.c
+++ b/fontconfig/src/fcstat.c
@@ -178,8 +178,9 @@ FcDirChecksum (const FcChar8 *dir, time_t *checksum)
{
struct Adler32 ctx;
struct dirent **files;
- int n, ret = 0;
+ int n;
#ifndef HAVE_STRUCT_DIRENT_D_TYPE
+ int ret = 0;
size_t len = strlen ((const char *)dir);
#endif
@@ -229,8 +230,10 @@ FcDirChecksum (const FcChar8 *dir, time_t *checksum)
free (files[n]);
}
free (files);
+#ifndef HAVE_STRUCT_DIRENT_D_TYPE
if (ret == -1)
return -1;
+#endif
*checksum = Adler32Finish (&ctx);
diff --git a/fontconfig/src/fcstr.c b/fontconfig/src/fcstr.c
index 99b59da0a..cc1465cc9 100644
--- a/fontconfig/src/fcstr.c
+++ b/fontconfig/src/fcstr.c
@@ -1193,7 +1193,7 @@ FcStrSetAddLangs (FcStrSet *strs, const char *languages)
while ((next = strchr (p, ':')))
{
len = next - p;
- len = FC_MIN (len, 128);
+ len = FC_MIN (len, 127);
strncpy ((char *) lang, p, len);
lang[len] = 0;
/* ignore an empty item */
diff --git a/fontconfig/src/fcxml.c b/fontconfig/src/fcxml.c
index 3a94af681..c9d41df8e 100644
--- a/fontconfig/src/fcxml.c
+++ b/fontconfig/src/fcxml.c
@@ -1861,6 +1861,7 @@ FcParseDir (FcConfigParse *parse)
if (!data)
{
FcConfigMessage (parse, FcSevereError, "out of memory");
+ data = prefix;
goto bail;
}
if (prefix)