From 7b3a959e21f7e5ab5ca21b394ab05e01c7c6d48d Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 1 Oct 2013 22:20:12 -0700 Subject: [PATCH] cairo: Let xr_layout_cell() assume its parameters are nonnull. This slightly simplifies the logic and all the callers appear to satisfy this requirement. --- src/output/cairo.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/output/cairo.c b/src/output/cairo.c index 6db86317d8..7165a50fd6 100644 --- a/src/output/cairo.c +++ b/src/output/cairo.c @@ -868,16 +868,7 @@ xr_layout_cell (struct xr_driver *xr, const struct table_cell *cell, cairo_restore (xr->cairo); } - if (width != NULL || height != NULL) - { - int w, h; - - pango_layout_get_size (font->layout, &w, &h); - if (width != NULL) - *width = w; - if (height != NULL) - *height = h; - } + pango_layout_get_size (font->layout, width, height); } static void -- 2.30.2