Skip to content

Commit

Permalink
Update verifying device serial logic (#278)
Browse files Browse the repository at this point in the history
Signed-off-by: Shrikant Temburwar <[email protected]>
  • Loading branch information
shrikant1407 authored Mar 14, 2024
1 parent 982a12d commit a436d19
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/m-string.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,13 @@ static int read_fill_modelserial(void)

ch = temp_device_serial[0];
while (ch != '\0') {
ch = temp_device_serial[curr];
if (!isalnum(ch)) {
flag = 1;
}
curr++;
ch = temp_device_serial[++curr];
if (ch == '\n') {
ch = temp_device_serial[++curr];
}
}

if (ret || flag) {
Expand Down

0 comments on commit a436d19

Please sign in to comment.