Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
fdtextract
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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
system
fdtextract
Commits
f766c741
Commit
f766c741
authored
3 years ago
by
Jani Juvan
Browse files
Options
Downloads
Patches
Plain Diff
Fixed sign-compare warnings
parent
19c8fda5
Branches
Branches containing commit
No related tags found
1 merge request
!8
Consolidate make flags into package makefile and harden them
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
fdtextract.c
+4
-4
4 additions, 4 deletions
fdtextract.c
with
4 additions
and
4 deletions
fdtextract.c
+
4
−
4
View file @
f766c741
...
...
@@ -113,7 +113,7 @@ static ssize_t copy_data(int out_fd, int in_fd, ssize_t size)
while
(
left
>
0
)
{
char
buf
[
4096
];
ssize_t
count
=
sizeof
(
buf
)
<
left
?
sizeof
(
buf
)
:
left
;
ssize_t
count
=
(
ssize_t
)
sizeof
(
buf
)
<
left
?
(
ssize_t
)
sizeof
(
buf
)
:
left
;
ssize_t
written
;
count
=
read
(
in_fd
,
buf
,
count
);
...
...
@@ -277,14 +277,14 @@ char *read_header(int fd)
return
NULL
;
len
=
read
(
fd
,
buf
,
FDT_V1_SIZE
);
if
(
len
<
FDT_V1_SIZE
)
{
if
(
len
<
(
ssize_t
)
FDT_V1_SIZE
)
{
free
(
buf
);
return
NULL
;
}
/* Read rest of header */
total_size
=
fdt_totalsize
(
buf
);
if
(
total_size
<
FDT_V1_SIZE
)
{
if
(
total_size
<
(
ssize_t
)
FDT_V1_SIZE
)
{
free
(
buf
);
return
NULL
;
}
...
...
@@ -297,7 +297,7 @@ char *read_header(int fd)
buf
=
tmp
;
len
=
read
(
fd
,
buf
+
FDT_V1_SIZE
,
total_size
-
FDT_V1_SIZE
);
if
(
len
<
total_size
-
FDT_V1_SIZE
)
{
if
(
len
<
total_size
-
(
ssize_t
)
FDT_V1_SIZE
)
{
free
(
buf
);
return
NULL
;
}
...
...
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