From b661f4bc270d5cc137af7c92c2103542ef8efcc3 Mon Sep 17 00:00:00 2001 From: John Cupitt Date: Wed, 12 Oct 2022 18:27:10 +0100 Subject: [PATCH] revise formatting --- libvips/foreign/nsgifload.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/libvips/foreign/nsgifload.c b/libvips/foreign/nsgifload.c index ac6deaac..37e57954 100644 --- a/libvips/foreign/nsgifload.c +++ b/libvips/foreign/nsgifload.c @@ -488,23 +488,27 @@ vips_foreign_load_nsgif_generate( VipsRegion *or, } int -vips_foreign_load_nsgif_tile_height(VipsForeignLoadNsgif *gif) { - int i; +vips_foreign_load_nsgif_tile_height( VipsForeignLoadNsgif *gif ) +{ int height = gif->info->height; - // First, check the perfect size - if (height % 16 == 0) - return 16; + int i; - // Next, check larger and smaller sizes - for (i = 1; i < 16; i++) { - if (height % (16 + i) == 0) - return (16 + i); - if (height % (16 - i) == 0) - return (16 - i); + /* First, check the perfect size. + */ + if( height % 16 == 0 ) + return( 16 ); + + /* Next, check larger and smaller sizes. + */ + for( i = 1; i < 16; i++ ) { + if( height % (16 + i) == 0 ) + return( 16 + i ); + if( height % (16 - i) == 0 ) + return( 16 - i ); } - return 1; + return( 1 ); } static int