[type42] Minor code optimization.

* src/type42/t42parse.c (t42_parse_sfnts): Use bitmask instead of
modulo operator.
This commit is contained in:
Werner Lemberg 2012-02-26 19:44:04 +01:00
parent 22fff25385
commit c42848e6d9
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,10 @@
2012-02-26 Alexei Podtelezhnikov <apodtele@gmail.com>
[type42] Minor code optimization.
* src/type42/t42parse.c (t42_parse_sfnts): Use bitmask instead of
modulo operator.
2012-02-26 Werner Lemberg <wl@gnu.org>
* docs/CHANGES: Updated.

View File

@ -608,8 +608,8 @@
}
/* A string can have a trailing zero byte for padding. Ignore it. */
if ( string_size &&
string_buf[string_size - 1] == 0 && ( string_size % 2 == 1 ) )
if ( string_size &&
string_buf[string_size - 1] == 0 && ( string_size & 1 ) )
string_size--;
if ( !string_size )