From: Ben Pfaff Date: Wed, 2 Oct 2013 05:20:12 +0000 (-0700) Subject: cairo: Let xr_layout_cell() assume its parameters are nonnull. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b3a959e21f7e5ab5ca21b394ab05e01c7c6d48d;p=pspp cairo: Let xr_layout_cell() assume its parameters are nonnull. This slightly simplifies the logic and all the callers appear to satisfy this requirement. --- 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