diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2008-09-03 16:12:53 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2008-09-03 16:33:49 +0100 |
commit | 8992312df016f5112a3e9907bd34fb153330f162 (patch) | |
tree | 413763774131a3d90656366f60f8b67c7eeb2dcb /src/cairo-truetype-subset.c | |
parent | 855310bc1f226292646931add0a5e6e6604730ba (diff) | |
download | cairo-8992312df016f5112a3e9907bd34fb153330f162.tar.gz |
[scaled-fonts] Cleanup a couple of valgrind warnings.
Beware the propagation of uninitialised variables and forgotten error
codes.
Diffstat (limited to 'src/cairo-truetype-subset.c')
-rw-r--r-- | src/cairo-truetype-subset.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/cairo-truetype-subset.c b/src/cairo-truetype-subset.c index 20bb7c67f..d432c4c86 100644 --- a/src/cairo-truetype-subset.c +++ b/src/cairo-truetype-subset.c @@ -1226,8 +1226,7 @@ _cairo_truetype_reverse_cmap (cairo_scaled_font_t *scaled_font, range_offset = &(delta[num_segments]); glyph_array = &(range_offset[num_segments]); - /* search for glyph in segments - * with rangeOffset=0 */ + /* search for glyph in segments with rangeOffset=0 */ for (i = 0; i < num_segments; i++) { c = index - be16_to_cpu (delta[i]); if (range_offset[i] == 0 && @@ -1296,7 +1295,7 @@ _cairo_truetype_index_to_ucs4 (cairo_scaled_font_t *scaled_font, cmap = (tt_cmap_t *) buf; num_tables = be16_to_cpu (cmap->num_tables); size = 4 + num_tables*sizeof(tt_cmap_index_t); - cmap = malloc (size); + cmap = _cairo_malloc_ab_plus_c (num_tables, sizeof (tt_cmap_index_t), 4); if (cmap == NULL) return _cairo_error (CAIRO_STATUS_NO_MEMORY); |