summaryrefslogtreecommitdiff
path: root/codec/convert.c
diff options
context:
space:
mode:
authorMathieu Malaterre <mathieu.malaterre@gmail.com>2006-07-22 03:27:36 +0000
committerMathieu Malaterre <mathieu.malaterre@gmail.com>2006-07-22 03:27:36 +0000
commit0577ed8e6e62323c0fbc005f2ecc125a901fb921 (patch)
treee584604a30390cc244a92057d530d3b79195659a /codec/convert.c
parent4f87b9abd11412d04c7575ba4b4ac5a7daf1079a (diff)
STYLE: Fix style issue
Diffstat (limited to 'codec/convert.c')
-rw-r--r--codec/convert.c9
1 files 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); */