diff --git a/backend/2of5.c b/backend/2of5.c index bf1805d5..01f799bf 100644 --- a/backend/2of5.c +++ b/backend/2of5.c @@ -64,8 +64,6 @@ int matrix_two_of_five(struct zint_symbol *symbol, unsigned char source[], int l int i, error_number; char dest[512]; /* 6 + 80 * 6 + 6 + 1 ~ 512*/ - error_number = 0; - if (length > 80) { strcpy(symbol->errtxt, "Input too long (C01)"); return ZINT_ERROR_TOO_LONG; @@ -97,8 +95,6 @@ int industrial_two_of_five(struct zint_symbol *symbol, unsigned char source[], i int i, error_number; char dest[512]; /* 6 + 40 * 10 + 6 + 1 */ - error_number = 0; - if (length > 45) { strcpy(symbol->errtxt, "Input too long (C03)"); return ZINT_ERROR_TOO_LONG; @@ -129,8 +125,6 @@ int iata_two_of_five(struct zint_symbol *symbol, unsigned char source[], int len int i, error_number; char dest[512]; /* 4 + 45 * 10 + 3 + 1 */ - error_number = 0; - if (length > 45) { strcpy(symbol->errtxt, "Input too long (C05)"); return ZINT_ERROR_TOO_LONG; @@ -162,8 +156,6 @@ int logic_two_of_five(struct zint_symbol *symbol, unsigned char source[], int le int i, error_number; char dest[512]; /* 4 + 80 * 6 + 3 + 1 */ - error_number = 0; - if (length > 80) { strcpy(symbol->errtxt, "Input too long (C07)"); return ZINT_ERROR_TOO_LONG; @@ -200,8 +192,6 @@ int interleaved_two_of_five(struct zint_symbol *symbol, const unsigned char sour unsigned char* temp = (unsigned char *) _alloca((length + 2) * sizeof (unsigned char)); #endif - error_number = 0; - if (length > 89) { strcpy(symbol->errtxt, "Input too long (C09)"); return ZINT_ERROR_TOO_LONG; @@ -258,8 +248,6 @@ int itf14(struct zint_symbol *symbol, unsigned char source[], int length) { unsigned int count; char localstr[16]; - error_number = 0; - count = 0; if (length > 13) { @@ -302,7 +290,6 @@ int dpleit(struct zint_symbol *symbol, unsigned char source[], int length) { char localstr[16]; int zeroes; - error_number = 0; count = 0; if (length > 13) { strcpy(symbol->errtxt, "Input wrong length (C0E)"); diff --git a/backend/code.c b/backend/code.c index f83f2ed5..cd948938 100644 --- a/backend/code.c +++ b/backend/code.c @@ -112,8 +112,6 @@ int code_11(struct zint_symbol *symbol, unsigned char source[], int length) { /* char dest[1024]; /* 6 + 121 * 6 + 2 * 6 + 5 + 1 ~ 1024*/ char checkstr[3]; - error_number = 0; - if (length > 121) { strcpy(symbol->errtxt, "Input too long (C20)"); return ZINT_ERROR_TOO_LONG; @@ -195,7 +193,6 @@ int c39(struct zint_symbol *symbol, unsigned char source[], const size_t length) char dest[775]; char localstr[2] = {0}; - error_number = 0; counter = 0; if ((symbol->option_2 < 0) || (symbol->option_2 > 1)) { @@ -298,8 +295,6 @@ int pharmazentral(struct zint_symbol *symbol, unsigned char source[], int length unsigned int count, check_digit; char localstr[10]; - error_number = 0; - count = 0; if (length > 6) { strcpy(symbol->errtxt, "Input wrong length (C25)"); @@ -344,8 +339,6 @@ int ec39(struct zint_symbol *symbol, unsigned char source[], int length) { unsigned int i; int error_number; - error_number = 0; - if (length > 74) { strcpy(symbol->errtxt, "Input too long (C28)"); return ZINT_ERROR_TOO_LONG; diff --git a/backend/medical.c b/backend/medical.c index c6e4e62c..1b43b31f 100644 --- a/backend/medical.c +++ b/backend/medical.c @@ -64,8 +64,6 @@ int pharma_one(struct zint_symbol *symbol, unsigned char source[], int length) { char inter[18] = {0}; /* 131070 -> 17 bits */ char dest[64]; /* 17 * 2 + 1 */ - error_number = 0; - if (length > 6) { strcpy(symbol->errtxt, "Input too long (C50)"); return ZINT_ERROR_TOO_LONG; @@ -199,7 +197,6 @@ int codabar(struct zint_symbol *symbol, unsigned char source[], int length) { int i, error_number; char dest[512]; - error_number = 0; strcpy(dest, ""); if (length > 60) { /* No stack smashing please */ diff --git a/backend/plessey.c b/backend/plessey.c index cfb3ac45..4f3f7384 100644 --- a/backend/plessey.c +++ b/backend/plessey.c @@ -57,8 +57,6 @@ int plessey(struct zint_symbol *symbol, unsigned char source[], int length) { char dest[1024]; /* 8 + 65 * 8 + 8 * 2 + 9 + 1 ~ 1024 */ int error_number; - error_number = 0; - if (length > 65) { strcpy(symbol->errtxt, "Input too long (C70)"); return ZINT_ERROR_TOO_LONG; diff --git a/backend/rss.c b/backend/rss.c index 688854c7..75fa75bf 100644 --- a/backend/rss.c +++ b/backend/rss.c @@ -1079,9 +1079,6 @@ int general_rules(char field[], char type[]) { block_count++; - for (i = 0; i < block_count; i++) { - } - for (i = 0; i < block_count; i++) { current = block[1][i]; next = (block[1][i + 1] & 0xFF); diff --git a/backend/telepen.c b/backend/telepen.c index 79aff4a5..7fa5d79b 100644 --- a/backend/telepen.c +++ b/backend/telepen.c @@ -109,7 +109,6 @@ int telepen_num(struct zint_symbol *symbol, unsigned char source[], int src_len) char dest[1024]; /* 14 + 60 * 14 + 14 + 14 + 1 ~ 1024 */ unsigned char temp[64]; - error_number = 0; count = 0; if (temp_length > 60) {