From: Patrick Lam Date: Tue, 21 Feb 2006 15:50:19 +0000 (+0000) Subject: Eliminate redundancies. X-Git-Tag: fc-2_3_94~8 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=f2fb985c7a0e51109b1750e166e4244a833ffbe3;p=fontconfig.git Eliminate redundancies. reviewed by: plam --- diff --git a/ChangeLog b/ChangeLog index 0aed5dc..4cd5ac4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2006-02-21 Paul Cornett + reviewed by: plam + + * src/fccache.c (FcDirCacheWrite): + * src/fcdir.c (FcFileScanConfig): + * src/fcfreetype.c (FcStringInPatternElement): + * src/fcxml.c (FcParseFamilies): + * src/ftglue.c (ftglue_face_goto_table): + + Eliminate redundancies. + 2006-02-21 Kjartan Maraas reviewed by: plam diff --git a/src/fccache.c b/src/fccache.c index 98f0a88..eda5de0 100644 --- a/src/fccache.c +++ b/src/fccache.c @@ -34,7 +34,7 @@ #include #define ENDIAN_TEST 0x12345678 -#define MACHINE_SIGNATURE_SIZE 9 + 5*20 + 1 +#define MACHINE_SIGNATURE_SIZE (9 + 5*20 + 1) #ifndef O_BINARY #define O_BINARY 0 @@ -1371,6 +1371,7 @@ FcDirCacheWrite (FcFontSet *set, FcStrSet *dirs, const FcChar8 *dir) metadata.count) perror("write current_dir_block"); free (current_dir_block); + current_dir_block = 0; } /* this actually serves to pad out the cache file, if needed */ diff --git a/src/fcdir.c b/src/fcdir.c index 18cb6cc..7e59452 100644 --- a/src/fcdir.c +++ b/src/fcdir.c @@ -55,9 +55,6 @@ FcFileScanConfig (FcFontSet *set, if (FcFileIsDir (file)) return FcStrSetAdd (dirs, file); - if (force) - cache = 0; - id = 0; do { diff --git a/src/fcfreetype.c b/src/fcfreetype.c index 4ce9f96..de20fd7 100644 --- a/src/fcfreetype.c +++ b/src/fcfreetype.c @@ -976,7 +976,6 @@ FcStringInPatternElement (FcPattern *pat, const char *elt, FcChar8 *string) if (!FcStrCmpIgnoreBlanksAndCase (old, string)) { return FcTrue; - break; } return FcFalse; } diff --git a/src/fcxml.c b/src/fcxml.c index 9aee898..1590358 100644 --- a/src/fcxml.c +++ b/src/fcxml.c @@ -1320,8 +1320,7 @@ FcParseFamilies (FcConfigParse *parse, FcVStackTag tag) if (!FcVStackPushExpr (parse, tag, expr)) { FcConfigMessage (parse, FcSevereError, "out of memory"); - if (expr) - FcExprDestroy (expr); + FcExprDestroy (expr); } } } diff --git a/src/ftglue.c b/src/ftglue.c index ebddfa7..5b48b11 100644 --- a/src/ftglue.c +++ b/src/ftglue.c @@ -290,7 +290,6 @@ ftglue_face_goto_table( FT_Face face, if ( face->num_faces > 1 ) { /* deal with TrueType collections */ - FT_ULong offset; LOG(( ">> This is a TrueType Collection\n" ));