Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- a.c 2018-04-21 14:14:59.246666844 +0300
- +++ b.c 2018-04-21 14:16:11.146666867 +0300
- @@ -57,11 +57,12 @@
- fds[mode] = open(argv[mode + 1], O_RDONLY);
- }
- if (fds[mode] == -2) {
- + mode = -1;
- continue;
- }
- u8 buf[16];
- isize rd = read(fds[mode], &buf, 16);
- - if (rd == -1) {
- + if (rd <= 0) {
- fds[mode] = -2;
- mode = -1;
- continue;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement