Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
pwmt
zathura
Commits
9fa858b2
Commit
9fa858b2
authored
Oct 04, 2010
by
Sebastian Ramacher
Browse files
don't hardcode stdin fileno
parent
ff0adf4d
Changes
1
Hide whitespace changes
Inline
Side-by-side
zathura.c
View file @
9fa858b2
...
...
@@ -1421,7 +1421,8 @@ open_stdin(gchar* password)
// read from stdin and dump to temporary file
char
buffer
[
BUFSIZ
];
ssize_t
count
=
0
;
while
((
count
=
read
(
0
,
buffer
,
BUFSIZ
))
>
0
)
int
stdinfno
=
fileno
(
stdin
);
while
((
count
=
read
(
stdinfno
,
buffer
,
BUFSIZ
))
>
0
)
{
if
(
write
(
handle
,
buffer
,
count
)
!=
count
)
{
...
...
Write
Preview
Supports
Markdown
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