Skip to content

Commit

Permalink
Don't use stdin as an lvalue
Browse files Browse the repository at this point in the history
freopen will always returns its last argument or 0. Therefore there
is no need of the unportable pratice of assigning stdin a value.

This fixes compilation with musl libc
  • Loading branch information
doughdemon committed Aug 19, 2015
1 parent f077f99 commit fe2d833
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fdupes.c
Expand Up @@ -1238,7 +1238,7 @@ int main(int argc, char **argv) {
}
else
{
stdin = freopen("/dev/tty", "r", stdin);
freopen("/dev/tty", "r", stdin);
deletefiles(files, 1, stdin);
}
}
Expand Down

0 comments on commit fe2d833

Please sign in to comment.