Skip to content

Commit

Permalink
init end_ptr to NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
touatily committed Mar 1, 2024
1 parent 48e6376 commit 7b9a344
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/error.c
Original file line number Diff line number Diff line change
Expand Up @@ -2171,7 +2171,7 @@ Bool gf_parse_frac(const char *value, GF_Fraction *frac)
}

Bool gf_strict_atoi(const char* str, int* ans) {
char * end_ptr;
char* end_ptr = NULL;
*ans = strtol(str, &end_ptr, 10);
return !isspace(*str) && end_ptr != str && *end_ptr == '\0';
}

0 comments on commit 7b9a344

Please sign in to comment.