* src/pcfread.c (pcf_get_properties, pcf_get_metrics, pcf_get_bitmaps): Fix compiler errors. * src/pcf/pcfread.c: Removed some compilation warnings related
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
diff --git a/ChangeLog b/ChangeLog
index bda0124..293bdf3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,11 @@
+2001-01-17 Francesco Zappa Nardelli <francesco.zappa.nardelli@ens.fr>
+
+ * src/pcfread.c (pcf_get_properties, pcf_get_metrics,
+ pcf_get_bitmaps): Fix compiler errors.
+
2001-01-11 David Turner <david.turner@freetype.org>
- * src/pcd/pcfread.c: Removed some compilation warnings related
+ * src/pcf/pcfread.c: Removed some compilation warnings related
to comparison of signed vs. unsigned integers.
* include/freetype/internal/ftdebug.h: Changed the debug trace
diff --git a/src/pcf/pcfread.c b/src/pcf/pcfread.c
index 0d5dec4..67016eb 100644
--- a/src/pcf/pcfread.c
+++ b/src/pcf/pcfread.c
@@ -434,10 +434,9 @@ THE SOFTWARE.
for ( i = 0; i < nprops; i++ )
{
/* XXX: make atom */
- error = ALLOC( properties[i].name,
+ if ( ALLOC( properties[i].name,
( strlen( strings + props[i].name ) + 1 ) *
- sizeof ( char ) );
- if ( error )
+ sizeof ( char ) ) )
goto Bail;
strcpy( properties[i].name,strings + props[i].name );
@@ -445,10 +444,9 @@ THE SOFTWARE.
if ( props[i].isString )
{
- error = ALLOC( properties[i].value.atom,
+ if ( ALLOC( properties[i].value.atom,
( strlen( strings + props[i].value ) + 1 ) *
- sizeof ( char ) );
- if ( error )
+ sizeof ( char ) ) )
goto Bail;
strcpy( properties[i].value.atom, strings + props[i].value );
}
@@ -519,8 +517,7 @@ THE SOFTWARE.
face->nmetrics = nmetrics;
- error = ALLOC( face->metrics, nmetrics * sizeof ( PCF_MetricRec ) );
- if ( error )
+ if ( ALLOC( face->metrics, nmetrics * sizeof ( PCF_MetricRec ) ) )
return FT_Err_Out_Of_Memory;
metrics = face->metrics;
@@ -587,8 +584,7 @@ THE SOFTWARE.
if ( nbitmaps != face->nmetrics )
return FT_Err_Invalid_File_Format;
- error = ALLOC( offsets, nbitmaps * sizeof ( FT_ULong ) );
- if ( error )
+ if ( ALLOC( offsets, nbitmaps * sizeof ( FT_ULong ) ) )
return error;
if ( error )