From 311a22c7a7e5518e06b0efb2ec6eb5aec453aaf2 Mon Sep 17 00:00:00 2001 From: jordan imbert Date: Thu, 17 Dec 2020 10:39:23 +0100 Subject: [PATCH] Remove always false blocks in parser.c --- libscpi/src/parser.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/libscpi/src/parser.c b/libscpi/src/parser.c index 67b9bd58..058cde7b 100644 --- a/libscpi/src/parser.c +++ b/libscpi/src/parser.c @@ -1399,13 +1399,6 @@ int scpiParser_parseAllProgramData(lex_state_t * state, scpi_token_t * token, in for (result = 1; result != 0; result = scpiLex_Comma(state, &tmp)) { token->len += result; - if (result == 0) { - token->type = SCPI_TOKEN_UNKNOWN; - token->len = 0; - paramCount = -1; - break; - } - result = scpiParser_parseProgramData(state, &tmp); if (tmp.type != SCPI_TOKEN_UNKNOWN) { token->len += result; @@ -1418,10 +1411,6 @@ int scpiParser_parseAllProgramData(lex_state_t * state, scpi_token_t * token, in paramCount++; } - if (token->len == -1) { - token->len = 0; - } - if (numberOfParameters != NULL) { *numberOfParameters = paramCount; }