diff options
author | Werner Lemberg <wl@gnu.org> | 2016-12-26 17:08:17 +0100 |
---|---|---|
committer | Werner Lemberg <wl@gnu.org> | 2016-12-26 17:08:17 +0100 |
commit | 4441f7b24675fbd7d91f794f5d54e6c1ff168439 (patch) | |
tree | 6272c1a7a82fef6c8b57b5131edd65bbde5cf420 /src/psaux | |
parent | 37c72f66a56887ec25f4f541337b00e8ba69b9ee (diff) | |
download | freetype2-4441f7b24675fbd7d91f794f5d54e6c1ff168439.tar.gz |
Replace `foo == NULL' and `foo != NULL' with `!foo' and `foo', resp.
Other minor formatting.
Diffstat (limited to 'src/psaux')
-rw-r--r-- | src/psaux/psobjs.c | 12 | ||||
-rw-r--r-- | src/psaux/t1cmap.c | 4 | ||||
-rw-r--r-- | src/psaux/t1decode.c | 6 |
3 files changed, 11 insertions, 11 deletions
diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c index dc19e8afc..262e9bdc7 100644 --- a/src/psaux/psobjs.c +++ b/src/psaux/psobjs.c @@ -750,7 +750,7 @@ if ( !token.type ) break; - if ( tokens != NULL && cur < limit ) + if ( tokens && cur < limit ) *cur = token; cur++; @@ -815,12 +815,12 @@ old_cur = cur; - if ( coords != NULL && count >= max_coords ) + if ( coords && count >= max_coords ) break; /* call PS_Conv_ToFixed() even if coords == NULL */ /* to properly parse number at `cur' */ - *( coords != NULL ? &coords[count] : &dummy ) = + *( coords ? &coords[count] : &dummy ) = (FT_Short)( PS_Conv_ToFixed( &cur, limit, 0 ) >> 16 ); if ( old_cur == cur ) @@ -895,12 +895,12 @@ old_cur = cur; - if ( values != NULL && count >= max_values ) + if ( values && count >= max_values ) break; /* call PS_Conv_ToFixed() even if coords == NULL */ /* to properly parse number at `cur' */ - *( values != NULL ? &values[count] : &dummy ) = + *( values ? &values[count] : &dummy ) = PS_Conv_ToFixed( &cur, limit, power_ten ); if ( old_cur == cur ) @@ -1172,7 +1172,7 @@ /* for this to work (FT_String**)q must have been */ /* initialized to NULL */ - if ( *(FT_String**)q != NULL ) + if ( *(FT_String**)q ) { FT_TRACE0(( "ps_parser_load_field: overwriting field %s\n", field->ident )); diff --git a/src/psaux/t1cmap.c b/src/psaux/t1cmap.c index d35243589..7709c1395 100644 --- a/src/psaux/t1cmap.c +++ b/src/psaux/t1cmap.c @@ -45,7 +45,7 @@ cmap->code_to_sid = is_expert ? psnames->adobe_expert_encoding : psnames->adobe_std_encoding; - FT_ASSERT( cmap->code_to_sid != NULL ); + FT_ASSERT( cmap->code_to_sid ); } @@ -201,7 +201,7 @@ cmap->count = (FT_UInt)encoding->code_last - cmap->first; cmap->indices = encoding->char_index; - FT_ASSERT( cmap->indices != NULL ); + FT_ASSERT( cmap->indices ); FT_ASSERT( encoding->code_first <= encoding->code_last ); return 0; diff --git a/src/psaux/t1decode.c b/src/psaux/t1decode.c index f7556789c..c80ca3f13 100644 --- a/src/psaux/t1decode.c +++ b/src/psaux/t1decode.c @@ -873,7 +873,7 @@ PS_Blend blend = decoder->blend; - if ( arg_cnt != 1 || blend == NULL ) + if ( arg_cnt != 1 || !blend ) goto Unexpected_OtherSubr; idx = Fix2Int( top[0] ); @@ -941,7 +941,7 @@ PS_Blend blend = decoder->blend; - if ( arg_cnt != 2 || blend == NULL ) + if ( arg_cnt != 2 || !blend ) goto Unexpected_OtherSubr; idx = Fix2Int( top[1] ); @@ -962,7 +962,7 @@ PS_Blend blend = decoder->blend; - if ( arg_cnt != 1 || blend == NULL ) + if ( arg_cnt != 1 || !blend ) goto Unexpected_OtherSubr; idx = Fix2Int( top[0] ); |