openvpn: Remove useless conditional block in parse_state

tok != NULL is already checked in the for loop conditions.

Change-Id: I86e42e4537060b2ed8c860c0b71a225c5fe026c7
This commit is contained in:
Pau Espin 2019-03-15 20:56:42 +01:00
parent 3d13718ce7
commit 778ac848d3
1 changed files with 18 additions and 19 deletions

View File

@ -98,7 +98,7 @@ static char *parse_state(struct msgb *msg, struct openvpn_client *vpn)
}
for (tok = strtok(tmp, ","), i = 0; tok && i < MAX_RESP_COMPONENTS; tok = strtok(NULL, ",")) {
if (tok) { /* Parse csv string and pick interesting tokens while ignoring the rest. */
/* Parse csv string and pick interesting tokens while ignoring the rest. */
switch (i++) {
/* case 0: unix/date time, not needed */
case 1:
@ -118,7 +118,6 @@ static char *parse_state(struct msgb *msg, struct openvpn_client *vpn)
break;
}
}
}
return NULL;
}