From: Patrick Lam Date: Thu, 13 Oct 2005 12:32:14 +0000 (+0000) Subject: Fix flipped return value on unlink. (Reported by Mike Fabian) X-Git-Tag: fc-2_3_92~23 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=1178b569764caaf51d2dc55f1c2cf969a98cf61e;p=fontconfig.git Fix flipped return value on unlink. (Reported by Mike Fabian) --- diff --git a/ChangeLog b/ChangeLog index ef860a8..2ccc120 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2005-10-13 Patrick Lam + * src/fccache.c (FcDirCacheUnlink): + + Fix flipped return value on unlink. (Reported by Mike Fabian) + +2005-10-12 Patrick Lam + + * src/fccache.c: + * src/fcdir.c (FcDirScanConfig): + * src/fcint.h: + + When fc-cache is run without --force, use directory cache files + to speed up fc-cache run time. (Reported by Mike Fabian) + 2005-10-06 Patrick Lam * src/fcname.c (FcObjectToPtr): diff --git a/src/fccache.c b/src/fccache.c index 8629385..7ccb529 100644 --- a/src/fccache.c +++ b/src/fccache.c @@ -574,11 +574,13 @@ FcDirCacheUnlink (const FcChar8 *dir) { FcChar8 *cache_file = FcStrPlus (dir, (FcChar8 *) "/" FC_DIR_CACHE_FILE); - if (!unlink ((char *)cache_file)) + if (unlink ((char *)cache_file) != 0) + { + FcStrFree (cache_file); return FcFalse; + } FcStrFree (cache_file); - return FcTrue; }