Skip to content

Commit

Permalink
Simplify and avoid uninitialized variable compiler warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
rdoeffinger committed Jun 10, 2022
1 parent c9a9fd9 commit 6fe0c01
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions iec16022ecc200.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,9 @@ static char ecc200encode(unsigned char *t, int tl, const unsigned char *s, int s
{
char out[6];
int p = 0;
const char *e,
*s2 = "!\"#$%&'()*+,-./:;<=>?@[\\]^_",
*s3 = 0;
const char *e = " 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\r*>"; // for X12
const char *s2 = "!\"#$%&'()*+,-./:;<=>?@[\\]^_";
const char *s3 = 0;
if (newenc == 'c') {
e = " 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
s3 = "`abcdefghijklmnopqrstuvwxyz{|}~\177";
Expand All @@ -267,8 +267,6 @@ static char ecc200encode(unsigned char *t, int tl, const unsigned char *s, int s
e = " 0123456789abcdefghijklmnopqrstuvwxyz";
s3 = "`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~\177";
}
if (newenc == 'x')
e = " 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\r*>";
do {
unsigned char c = s[sp++];
char *w;
Expand Down

0 comments on commit 6fe0c01

Please sign in to comment.