Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Sunxi Tools
Commits
9e79a0d9
Commit
9e79a0d9
authored
Apr 12, 2013
by
Angus Gratton
Browse files
pio.c: Fix broken file I/O
parent
4820fae9
Changes
1
Show whitespace changes
Inline
Side-by-side
pio.c
View file @
9e79a0d9
...
...
@@ -392,7 +392,7 @@ int main(int argc, char **argv)
}
}
if
(
in
)
{
if
(
fread
(
buf
,
sizeof
(
buf
)
,
1
,
in
)
!=
1
)
{
if
(
fread
(
buf
,
PIO_REG_SIZE
,
1
,
in
)
!=
1
)
{
perror
(
"read input"
);
exit
(
1
);
}
...
...
@@ -414,7 +414,7 @@ int main(int argc, char **argv)
exit
(
1
);
}
}
if
(
fwrite
(
buf
,
sizeof
(
buf
)
,
1
,
out
)
!=
1
)
{
if
(
fwrite
(
buf
,
PIO_REG_SIZE
,
1
,
out
)
!=
1
)
{
perror
(
"write output"
);
exit
(
1
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment