mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
checkasm: Read the unsigned value as it should
Reading a value larger than int using atoi() may give the wrong result.
This commit is contained in:
parent
75d642a944
commit
e89cef4050
@ -477,7 +477,8 @@ static void print_cpu_name(void)
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int i, seed, ret = 0;
|
||||
unsigned int seed;
|
||||
int i, ret = 0;
|
||||
|
||||
#if ARCH_ARM && HAVE_ARMV5TE_EXTERNAL
|
||||
if (have_vfp(av_get_cpu_flags()) || have_neon(av_get_cpu_flags()))
|
||||
@ -504,7 +505,7 @@ int main(int argc, char *argv[])
|
||||
argv++;
|
||||
}
|
||||
|
||||
seed = (argc > 1) ? atoi(argv[1]) : av_get_random_seed();
|
||||
seed = (argc > 1) ? strtoul(argv[1], NULL, 10) : av_get_random_seed();
|
||||
fprintf(stderr, "checkasm: using random seed %u\n", seed);
|
||||
av_lfg_init(&checkasm_lfg, seed);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user