nstime: Fix Dead Store (found by Clang Analyzer)

Although the value stored to 'n_scanned' is used in the enclosing expression, the value is never actually read from 'n_scanned'
This commit is contained in:
Alexis La Goutte 2021-07-27 12:43:15 +00:00 committed by Wireshark GitLab Utility
parent 7e7ef43b04
commit 17f474406a
1 changed files with 2 additions and 2 deletions

View File

@ -412,7 +412,7 @@ iso8601_to_nstime(nstime_t *nstime, const char *ptr)
if (*ptr == '-' || *ptr == '+' || *ptr == 'Z') {
/* We have a UTC-relative offset */
if (*ptr == 'Z') {
off_hr = off_min = n_scanned = 0;
off_hr = off_min = 0;
have_offset = TRUE;
ptr++;
}
@ -438,7 +438,7 @@ iso8601_to_nstime(nstime_t *nstime, const char *ptr)
}
else {
/* Didn't get a valid offset, treat as if there's none at all */
off_hr = off_min = n_scanned = 0;
off_hr = off_min = 0;
have_offset = FALSE;
}
}