summaryrefslogtreecommitdiff
path: root/libopenjpeg/t2.c
diff options
context:
space:
mode:
authorMickael Savinaud <savmickael@users.noreply.github.com>2012-09-27 09:29:47 +0000
committerMickael Savinaud <savmickael@users.noreply.github.com>2012-09-27 09:29:47 +0000
commitd47b8fef182d49205111d4c9fb0de8c08f74346f (patch)
tree0fd09ade04be049d64478f4cdbd667ed25cd8ba5 /libopenjpeg/t2.c
parentf8fc214b112bb64384ccec455ba8e43e02d63069 (diff)
[trunk] modify output type of t2_getcommacode
Diffstat (limited to 'libopenjpeg/t2.c')
-rw-r--r--libopenjpeg/t2.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/libopenjpeg/t2.c b/libopenjpeg/t2.c
index a2e52edf..0ceb17b0 100644
--- a/libopenjpeg/t2.c
+++ b/libopenjpeg/t2.c
@@ -38,7 +38,8 @@
/*@{*/
static void t2_putcommacode(opj_bio_t *bio, int n);
-static int t2_getcommacode(opj_bio_t *bio);
+
+static OPJ_UINT32 t2_getcommacode(opj_bio_t *bio);
/**
Variable length code for signalling delta Zil (truncation point)
@param bio Bit Input/Output component
@@ -186,12 +187,13 @@ static void t2_putcommacode(opj_bio_t *bio, int n) {
bio_write(bio, 0, 1);
}
-static int t2_getcommacode(opj_bio_t *bio) {
- int n;
- for (n = 0; bio_read(bio, 1); n++) {
- ;
- }
- return n;
+static OPJ_UINT32 t2_getcommacode(opj_bio_t *bio)
+{
+ OPJ_UINT32 n = 0;
+ while (bio_read(bio, 1)) {
+ ++n;
+ }
+ return n;
}
static void t2_putnumpasses(opj_bio_t *bio, int n) {