ref: 6949797d605fa1444085462e9dce4d626c1de119
parent: 5d664b6d5188625d0585086020e99e6223c2afb1
author: Werner Lemberg <[email protected]>
date: Sat Dec 17 16:05:54 EST 2016
More code formatting.
--- a/builds/mac/ftmac.c
+++ b/builds/mac/ftmac.c
@@ -940,7 +940,7 @@
{
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 @@
}
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 @@
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 @@
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 @@
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 @@
/* 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 @@
/* 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 @@
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 @@
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 */
--- 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 */
--- 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;
}
--- 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;