Remove superfluous code

This commit is contained in:
Boris Zentner 2016-05-22 22:26:00 +02:00 committed by Robin Stuart
parent bfb4d3284b
commit 63a252a573
6 changed files with 0 additions and 29 deletions

View File

@ -64,8 +64,6 @@ int matrix_two_of_five(struct zint_symbol *symbol, unsigned char source[], int l
int i, error_number; int i, error_number;
char dest[512]; /* 6 + 80 * 6 + 6 + 1 ~ 512*/ char dest[512]; /* 6 + 80 * 6 + 6 + 1 ~ 512*/
error_number = 0;
if (length > 80) { if (length > 80) {
strcpy(symbol->errtxt, "Input too long (C01)"); strcpy(symbol->errtxt, "Input too long (C01)");
return ZINT_ERROR_TOO_LONG; 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; int i, error_number;
char dest[512]; /* 6 + 40 * 10 + 6 + 1 */ char dest[512]; /* 6 + 40 * 10 + 6 + 1 */
error_number = 0;
if (length > 45) { if (length > 45) {
strcpy(symbol->errtxt, "Input too long (C03)"); strcpy(symbol->errtxt, "Input too long (C03)");
return ZINT_ERROR_TOO_LONG; 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; int i, error_number;
char dest[512]; /* 4 + 45 * 10 + 3 + 1 */ char dest[512]; /* 4 + 45 * 10 + 3 + 1 */
error_number = 0;
if (length > 45) { if (length > 45) {
strcpy(symbol->errtxt, "Input too long (C05)"); strcpy(symbol->errtxt, "Input too long (C05)");
return ZINT_ERROR_TOO_LONG; 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; int i, error_number;
char dest[512]; /* 4 + 80 * 6 + 3 + 1 */ char dest[512]; /* 4 + 80 * 6 + 3 + 1 */
error_number = 0;
if (length > 80) { if (length > 80) {
strcpy(symbol->errtxt, "Input too long (C07)"); strcpy(symbol->errtxt, "Input too long (C07)");
return ZINT_ERROR_TOO_LONG; 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)); unsigned char* temp = (unsigned char *) _alloca((length + 2) * sizeof (unsigned char));
#endif #endif
error_number = 0;
if (length > 89) { if (length > 89) {
strcpy(symbol->errtxt, "Input too long (C09)"); strcpy(symbol->errtxt, "Input too long (C09)");
return ZINT_ERROR_TOO_LONG; return ZINT_ERROR_TOO_LONG;
@ -258,8 +248,6 @@ int itf14(struct zint_symbol *symbol, unsigned char source[], int length) {
unsigned int count; unsigned int count;
char localstr[16]; char localstr[16];
error_number = 0;
count = 0; count = 0;
if (length > 13) { if (length > 13) {
@ -302,7 +290,6 @@ int dpleit(struct zint_symbol *symbol, unsigned char source[], int length) {
char localstr[16]; char localstr[16];
int zeroes; int zeroes;
error_number = 0;
count = 0; count = 0;
if (length > 13) { if (length > 13) {
strcpy(symbol->errtxt, "Input wrong length (C0E)"); strcpy(symbol->errtxt, "Input wrong length (C0E)");

View File

@ -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 dest[1024]; /* 6 + 121 * 6 + 2 * 6 + 5 + 1 ~ 1024*/
char checkstr[3]; char checkstr[3];
error_number = 0;
if (length > 121) { if (length > 121) {
strcpy(symbol->errtxt, "Input too long (C20)"); strcpy(symbol->errtxt, "Input too long (C20)");
return ZINT_ERROR_TOO_LONG; 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 dest[775];
char localstr[2] = {0}; char localstr[2] = {0};
error_number = 0;
counter = 0; counter = 0;
if ((symbol->option_2 < 0) || (symbol->option_2 > 1)) { 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; unsigned int count, check_digit;
char localstr[10]; char localstr[10];
error_number = 0;
count = 0; count = 0;
if (length > 6) { if (length > 6) {
strcpy(symbol->errtxt, "Input wrong length (C25)"); 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; unsigned int i;
int error_number; int error_number;
error_number = 0;
if (length > 74) { if (length > 74) {
strcpy(symbol->errtxt, "Input too long (C28)"); strcpy(symbol->errtxt, "Input too long (C28)");
return ZINT_ERROR_TOO_LONG; return ZINT_ERROR_TOO_LONG;

View File

@ -64,8 +64,6 @@ int pharma_one(struct zint_symbol *symbol, unsigned char source[], int length) {
char inter[18] = {0}; /* 131070 -> 17 bits */ char inter[18] = {0}; /* 131070 -> 17 bits */
char dest[64]; /* 17 * 2 + 1 */ char dest[64]; /* 17 * 2 + 1 */
error_number = 0;
if (length > 6) { if (length > 6) {
strcpy(symbol->errtxt, "Input too long (C50)"); strcpy(symbol->errtxt, "Input too long (C50)");
return ZINT_ERROR_TOO_LONG; return ZINT_ERROR_TOO_LONG;
@ -199,7 +197,6 @@ int codabar(struct zint_symbol *symbol, unsigned char source[], int length) {
int i, error_number; int i, error_number;
char dest[512]; char dest[512];
error_number = 0;
strcpy(dest, ""); strcpy(dest, "");
if (length > 60) { /* No stack smashing please */ if (length > 60) { /* No stack smashing please */

View File

@ -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 */ char dest[1024]; /* 8 + 65 * 8 + 8 * 2 + 9 + 1 ~ 1024 */
int error_number; int error_number;
error_number = 0;
if (length > 65) { if (length > 65) {
strcpy(symbol->errtxt, "Input too long (C70)"); strcpy(symbol->errtxt, "Input too long (C70)");
return ZINT_ERROR_TOO_LONG; return ZINT_ERROR_TOO_LONG;

View File

@ -1079,9 +1079,6 @@ int general_rules(char field[], char type[]) {
block_count++; block_count++;
for (i = 0; i < block_count; i++) {
}
for (i = 0; i < block_count; i++) { for (i = 0; i < block_count; i++) {
current = block[1][i]; current = block[1][i];
next = (block[1][i + 1] & 0xFF); next = (block[1][i + 1] & 0xFF);

View File

@ -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 */ char dest[1024]; /* 14 + 60 * 14 + 14 + 14 + 1 ~ 1024 */
unsigned char temp[64]; unsigned char temp[64];
error_number = 0;
count = 0; count = 0;
if (temp_length > 60) { if (temp_length > 60) {