]> granicus.if.org Git - openjpeg/commitdiff
[trunk] style
authorMickael Savinaud <savmickael@users.noreply.github.com>
Wed, 2 May 2012 13:37:54 +0000 (13:37 +0000)
committerMickael Savinaud <savmickael@users.noreply.github.com>
Wed, 2 May 2012 13:37:54 +0000 (13:37 +0000)
libopenjpeg/image.c
libopenjpeg/openjpeg.c

index 3b87e6c4fa9284ad8ea61e387755297d2009f8ca..baebc2a2397eaf8e17f41ed6d75b345eaad180ee 100644 (file)
@@ -201,21 +201,21 @@ opj_image_t* OPJ_CALLCONV opj_image_tile_create(OPJ_UINT32 numcmpts, opj_image_c
        opj_image_t *image = 00;
 
        image = (opj_image_t*) opj_malloc(sizeof(opj_image_t));
-       if
-               (image)
+       if (image)
        {
                memset(image,0,sizeof(opj_image_t));
+               
                image->color_space = clrspc;
                image->numcomps = numcmpts;
+               
                /* allocate memory for the per-component information */
                image->comps = (opj_image_comp_t*)opj_malloc(image->numcomps * sizeof(opj_image_comp_t));
-               if
-                       (!image->comps)
-               {
+               if (!image->comps) {
                        opj_image_destroy(image);
                        return 00;
                }
                memset(image->comps,0,image->numcomps * sizeof(opj_image_comp_t));
+               
                /* create the individual image components */
                for(compno = 0; compno < numcmpts; compno++) {
                        opj_image_comp_t *comp = &image->comps[compno];
@@ -230,5 +230,6 @@ opj_image_t* OPJ_CALLCONV opj_image_tile_create(OPJ_UINT32 numcmpts, opj_image_c
                        comp->data = 0;
                }
        }
+
        return image;
 }
index 3696449248bf2822b5f25f91cf1dbc87720d8439..fb0c748ca3f03f837e97cccd2b2b9f6bf94c837d 100644 (file)
@@ -1333,7 +1333,7 @@ opj_bool OPJ_CALLCONV opj_write_tile (    opj_codec_t *p_codec,
 {
        if (p_codec && p_stream && p_data) {
                opj_codec_private_t * l_codec = (opj_codec_private_t *) p_codec;
-               opj_stream_private_t * l_cio = (opj_stream_private_t *) p_stream;
+               opj_stream_private_t * l_stream = (opj_stream_private_t *) p_stream;
 
                if (l_codec->is_decompressor) {
                        return OPJ_FALSE;
@@ -1343,7 +1343,7 @@ opj_bool OPJ_CALLCONV opj_write_tile (    opj_codec_t *p_codec,
                                                                                                                                        p_tile_index,
                                                                                                                                        p_data,
                                                                                                                                        p_data_size,
-                                                                                                                                       l_cio,
+                                                                                                                                       l_stream,
                                                                                                                                        &(l_codec->m_event_mgr) );
        }