summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nbd/client.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nbd/client.c b/nbd/client.c
index ffb0743bce..55266c1d80 100644
--- a/nbd/client.c
+++ b/nbd/client.c
@@ -94,7 +94,7 @@ static ssize_t drop_sync(QIOChannel *ioc, size_t size)
char small[1024];
char *buffer;
- buffer = sizeof(small) < size ? small : g_malloc(MIN(65536, size));
+ buffer = sizeof(small) >= size ? small : g_malloc(MIN(65536, size));
while (size > 0) {
ssize_t count = read_sync(ioc, buffer, MIN(65536, size));