Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
ffmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Luma Media Server
ffmpeg
Commits
e89cef40
Commit
e89cef40
authored
8 years ago
by
Luca Barbato
Browse files
Options
Downloads
Patches
Plain Diff
checkasm: Read the unsigned value as it should
Reading a value larger than int using atoi() may give the wrong result.
parent
75d642a9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/checkasm/checkasm.c
+3
-2
3 additions, 2 deletions
tests/checkasm/checkasm.c
with
3 additions
and
2 deletions
tests/checkasm/checkasm.c
+
3
−
2
View file @
e89cef40
...
@@ -477,7 +477,8 @@ static void print_cpu_name(void)
...
@@ -477,7 +477,8 @@ static void print_cpu_name(void)
int
main
(
int
argc
,
char
*
argv
[])
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 ARCH_ARM && HAVE_ARMV5TE_EXTERNAL
if
(
have_vfp
(
av_get_cpu_flags
())
||
have_neon
(
av_get_cpu_flags
()))
if
(
have_vfp
(
av_get_cpu_flags
())
||
have_neon
(
av_get_cpu_flags
()))
...
@@ -504,7 +505,7 @@ int main(int argc, char *argv[])
...
@@ -504,7 +505,7 @@ int main(int argc, char *argv[])
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
);
fprintf
(
stderr
,
"checkasm: using random seed %u
\n
"
,
seed
);
av_lfg_init
(
&
checkasm_lfg
,
seed
);
av_lfg_init
(
&
checkasm_lfg
,
seed
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment