From 6949797d605fa1444085462e9dce4d626c1de119 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Sat, 17 Dec 2016 21:05:54 +0100 Subject: [PATCH] More code formatting. --- builds/mac/ftmac.c | 18 +++++++++--------- src/base/ftmac.c | 2 +- src/cff/cffparse.c | 2 +- src/type1/t1load.c | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/builds/mac/ftmac.c b/builds/mac/ftmac.c index 4691deda0..cbb3cd731 100644 --- a/builds/mac/ftmac.c +++ b/builds/mac/ftmac.c @@ -940,7 +940,7 @@ typedef short ResourceIndex; { err = lookup_lwfn_by_fond( pathname, lwfn_file_name, buff, sizeof ( buff ) ); - if ( FT_Err_Ok == err ) + if ( !err ) have_lwfn = 1; } @@ -1217,7 +1217,7 @@ typedef short ResourceIndex; } CloseResFile( res_ref ); - if ( FT_Err_Ok == error && NULL != aface ) + if ( !error && aface ) (*aface)->num_faces = num_faces_in_res; return error; } @@ -1279,7 +1279,7 @@ typedef short ResourceIndex; error = lookup_lwfn_by_fond( path_fond, lwfn_file_name, path_lwfn, sizeof ( path_lwfn ) ); - if ( FT_Err_Ok == error ) + if ( !error ) have_lwfn = 1; } @@ -1315,7 +1315,7 @@ typedef short ResourceIndex; error = lookup_lwfn_by_fond( path_fond, lwfn_file_name, path_lwfn, sizeof ( path_lwfn ) ); - if ( FT_Err_Ok == error ) + if ( !error ) have_lwfn = 1; } @@ -1332,7 +1332,7 @@ typedef short ResourceIndex; error = FT_ERR( Unknown_File_Format ); found_no_lwfn_file: - if ( have_sfnt && FT_Err_Ok != error ) + if ( have_sfnt && error ) error = FT_New_Face_From_SFNT( library, sfnt_id, face_index, @@ -1363,7 +1363,7 @@ typedef short ResourceIndex; /* if it works, fine. */ error = FT_New_Face_From_Suitcase( library, pathname, face_index, aface ); - if ( error == 0 ) + if ( !error ) return error; /* let it fall through to normal loader (.ttf, .otf, etc.); */ @@ -1403,7 +1403,7 @@ typedef short ResourceIndex; /* try resourcefork based font: LWFN, FFIL */ error = FT_New_Face_From_Resource( library, (UInt8 *)pathname, face_index, aface ); - if ( error != 0 || *aface != NULL ) + if ( error || *aface ) return error; /* let it fall through to normal loader (.ttf, .otf, etc.) */ @@ -1458,7 +1458,7 @@ typedef short ResourceIndex; error = FT_ERR( Cannot_Open_Resource ); error = FT_New_Face_From_Resource( library, pathname, face_index, aface ); - if ( error != 0 || *aface != NULL ) + if ( error || *aface ) return error; /* fallback to datafork font */ @@ -1515,7 +1515,7 @@ typedef short ResourceIndex; error = FT_ERR( Cannot_Open_Resource ); error = FT_New_Face_From_Resource( library, pathname, face_index, aface ); - if ( error != 0 || *aface != NULL ) + if ( error || *aface ) return error; /* fallback to datafork font */ diff --git a/src/base/ftmac.c b/src/base/ftmac.c index e93d7e8ae..55cdea6af 100644 --- a/src/base/ftmac.c +++ b/src/base/ftmac.c @@ -1029,7 +1029,7 @@ error = FT_THROW( Cannot_Open_Resource ); error = FT_New_Face_From_Resource( library, pathname, face_index, aface ); - if ( error != 0 || *aface != NULL ) + if ( error || *aface ) return error; /* fallback to datafork font */ diff --git a/src/cff/cffparse.c b/src/cff/cffparse.c index 9b5ad72ca..a848631ba 100644 --- a/src/cff/cffparse.c +++ b/src/cff/cffparse.c @@ -902,7 +902,7 @@ priv->vsindex, subFont->lenNDV, subFont->NDV ); - if ( error != FT_Err_Ok ) + if ( error ) goto Exit; } diff --git a/src/type1/t1load.c b/src/type1/t1load.c index 2b64f85e4..03b08791d 100644 --- a/src/type1/t1load.c +++ b/src/type1/t1load.c @@ -2156,7 +2156,7 @@ parser->root.error = t1_load_keyword( face, loader, keyword ); - if ( parser->root.error != FT_Err_Ok ) + if ( parser->root.error ) { if ( FT_ERR_EQ( parser->root.error, Ignore ) ) parser->root.error = FT_Err_Ok;