Diff between d328abaa1715d3d8df05b06a2e09429fcdeebe34 and 497a0b220dbdd9b10d0ba797645d327cd6cfb6e5
Changed Files
| File | Additions | Deletions | Status |
| tools/btsnoop.c | +1 | -1 | modified |
Full Patch
diff --git a/tools/btsnoop.c b/tools/btsnoop.c
index 738027d..a0d6cf3 100644
--- a/tools/btsnoop.c
+++ b/tools/btsnoop.c
@@ -193,7 +193,7 @@ next_packet:
flags = be32toh(input_pkt[select_input].flags);
len = read(input_fd[select_input], buf, toread);
- if (len < 0 || len != (ssize_t) toread) {
+ if (toread == 0 || len < 0 || len != (ssize_t) toread) {
close(input_fd[select_input]);
input_fd[select_input] = -1;
goto next_packet;