From 0577ed8e6e62323c0fbc005f2ecc125a901fb921 Mon Sep 17 00:00:00 2001 From: Mathieu Malaterre Date: Sat, 22 Jul 2006 03:27:36 +0000 Subject: [PATCH] STYLE: Fix style issue --- codec/convert.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/codec/convert.c b/codec/convert.c index 85df8b44..db1e6740 100644 --- a/codec/convert.c +++ b/codec/convert.c @@ -786,14 +786,12 @@ int imagetopgx(opj_image_t * image, const char *outfile) { const size_t olen = strlen(outfile); const size_t dotpos = olen - 4; const size_t total = dotpos + 1 + 1 + 4; /* '-' + '[1-3]' + '.pgx' */ - if( outfile[dotpos] != '.' ) - { + if( outfile[dotpos] != '.' ) { /* `pgx` was recognized but there is no dot at expected position */ fprintf(stderr, "ERROR -> Impossible happen." ); return 1; } - if( total > 256 ) - { + if( total > 256 ) { name = (char*)malloc(total+1); } strncpy(name, outfile, dotpos); @@ -808,8 +806,7 @@ int imagetopgx(opj_image_t * image, const char *outfile) { return 1; } /* dont need name anymore */ - if( total > 256 ) - { + if( total > 256 ) { free(name); } /* w = int_ceildiv(image->x1 - image->x0, comp->dx); */