Skip to content

Commit

Permalink
Some variables' type changed from int to size_t. (see fukuchi#89 and f…
Browse files Browse the repository at this point in the history
  • Loading branch information
fukuchi committed Sep 29, 2017
1 parent 38327c2 commit 5c40306
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
2017.09.29 Kentaro Fukuchi <[email protected]>
[4.0]
* README.md:
- Format fixes.
* rsecc.[ch]:
- Some variables' type changed from int to size_t. (closing #89 and
#102)

2017.09.21 Kentaro Fukuchi <[email protected]>
[4.0]
* qrencode.1.in, NEWS:
Expand Down
8 changes: 4 additions & 4 deletions rsecc.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ static void RSECC_init(void)
initialized = 1;
}

static void generator_init(int length)
static void generator_init(size_t length)
{
int i, j;
size_t i, j;
int g[max_generatorSize + 1];

g[0] = 1;
Expand All @@ -102,9 +102,9 @@ static void generator_init(int length)
generatorInitialized[length - min_length] = 1;
}

int RSECC_encode(int data_length, int ecc_length, const unsigned char *data, unsigned char *ecc)
int RSECC_encode(size_t data_length, size_t ecc_length, const unsigned char *data, unsigned char *ecc)
{
int i, j;
size_t i, j;
unsigned char feedback;
unsigned char *gen;

Expand Down
2 changes: 1 addition & 1 deletion rsecc.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@
#ifndef RSECC_H
#define RSECC_H

extern int RSECC_encode(int data_length, int ecc_length, const unsigned char *data, unsigned char *ecc);
extern int RSECC_encode(size_t data_length, size_t ecc_length, const unsigned char *data, unsigned char *ecc);

#endif /* RSECC_H */

0 comments on commit 5c40306

Please sign in to comment.