Skip to content

Commit

Permalink
Remove always false blocks in parser.c
Browse files Browse the repository at this point in the history
  • Loading branch information
jordan imbert committed Dec 17, 2020
1 parent a077a73 commit 311a22c
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions libscpi/src/parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
Expand Down

0 comments on commit 311a22c

Please sign in to comment.