mirror of
https://git.sr.ht/~cismonx/bookmarkfs
synced 2025-06-07 19:58:50 +00:00
backend_firefox: fix integer parsing
This commit is contained in:
parent
0a4ff8770e
commit
bd343ddf4b
1 changed files with 2 additions and 2 deletions
|
@ -1548,7 +1548,7 @@ parse_mkfsopts (
|
||||||
BACKEND_OPT_VAL_START
|
BACKEND_OPT_VAL_START
|
||||||
char *end;
|
char *end;
|
||||||
int64_t val = strtoll(BACKEND_OPT_VAL_STR, &end, 10);
|
int64_t val = strtoll(BACKEND_OPT_VAL_STR, &end, 10);
|
||||||
if (*end == '\0' || val < 0 || val == LLONG_MAX) {
|
if (*end != '\0' || val < 0 || val == LLONG_MAX) {
|
||||||
return BACKEND_OPT_BAD_VAL();
|
return BACKEND_OPT_BAD_VAL();
|
||||||
}
|
}
|
||||||
parsed_opts->date_added = val;
|
parsed_opts->date_added = val;
|
||||||
|
@ -1640,7 +1640,7 @@ parse_usecs (
|
||||||
|
|
||||||
char *end;
|
char *end;
|
||||||
int64_t usecs = strtoll(buf, &end, 10);
|
int64_t usecs = strtoll(buf, &end, 10);
|
||||||
if (*end == '\0' || usecs < 0 || usecs == LLONG_MAX) {
|
if (*end != '\0' || usecs < 0 || usecs == LLONG_MAX) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue