projects
/
platform
/
upstream
/
nbd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
54a8813
)
actually check that read may return zero on EOF
author
reidrac
<jjm@usebox.net>
Sat, 26 Jan 2013 13:22:36 +0000
(13:22 +0000)
committer
reidrac
<jjm@usebox.net>
Sat, 26 Jan 2013 13:22:36 +0000
(13:22 +0000)
nbd-client.c
patch
|
blob
|
history
diff --git
a/nbd-client.c
b/nbd-client.c
index 49f75eded4ee3f7ef4113aeefe9928dc58346e30..1445621ba552b1e4fa915aff2b7aa07b1db93721 100644
(file)
--- a/
nbd-client.c
+++ b/
nbd-client.c
@@
-283,7
+283,7
@@
void negotiate(int sock, u64 *rsize64, u32 *flags, char* name, uint32_t needed_f
printf(".");
}
- if (read(sock, &size64, sizeof(size64)) < 0) {
+ if (read(sock, &size64, sizeof(size64)) <
=
0) {
if (!errno)
err("Server closed connection");
err("Failed/3: %m\n");