Skip to content

Commit 3398c45

Browse files
author
jason_yao
committed
update
1 parent 4bc3d9c commit 3398c45

9 files changed

Lines changed: 250 additions & 248 deletions

File tree

10.3 KB
Binary file not shown.

example/LDDP_JP/TW-samples/chap6/poll/app/nonblk.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ int main(void)
2929

3030
printf("read() ...\n");
3131
sz = read(fd, buf, sizeof(buf));
32-
printf("read() %d\n", sz);
32+
printf("read() %ld\n", sz);
3333
if (sz > 0) {
3434
for (i = 0 ; i < sz ; i++) {
3535
printf("%02x ", buf[i]);
10.6 KB
Binary file not shown.

example/LDDP_JP/TW-samples/chap6/poll/app/poll.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ int main(void)
4747
if (fds.revents & POLLIN) {
4848
printf("read() ...\n");
4949
sz = read(fd, buf, sizeof(buf));
50-
printf("read() %d\n", sz);
50+
printf("read() %ld\n", sz);
5151
for (i = 0 ; i < sz ; i++) {
5252
printf("%02x ", buf[i]);
5353
}
0 Bytes
Binary file not shown.

example/LDDP_JP/TW-samples/chap6/poll/app/select.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ int main(void)
4242
break;
4343
}
4444

45+
// printf("retval=%d\n", retval);
46+
4547
if (retval) {
4648
break;
4749
}

0 commit comments

Comments
 (0)