]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: client io shouldn't try to write zero length buffer
authorYehuda Sadeh <yehuda@redhat.com>
Wed, 20 Jan 2016 18:32:15 +0000 (10:32 -0800)
committerYehuda Sadeh <yehuda@redhat.com>
Wed, 20 Jan 2016 18:32:15 +0000 (10:32 -0800)
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
src/rgw/rgw_client_io.cc

index 1f8b803a3d405e65c483296ffe6b47caaa90a781..b6ef745c4f275dec652b83841090f6368b26d115 100644 (file)
@@ -51,6 +51,10 @@ int RGWClientIO::print(const char *format, ...)
 
 int RGWClientIO::write(const char *buf, int len)
 {
+  if (len == 0) {
+    return 0;
+  }
+
   int ret = write_data(buf, len);
   if (ret < 0)
     return ret;