]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librados/librados.cc: don't check unsigned 'len' against less than zero
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 28 Feb 2013 18:34:47 +0000 (19:34 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 28 Feb 2013 18:34:47 +0000 (19:34 +0100)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/librados/librados.cc

index aace7d57500f5550bf29fad6e92e5bad1caa549b..c03a20f8d12645dce50de9f7703f053f7e7204fe 100644 (file)
@@ -1543,7 +1543,7 @@ extern "C" int rados_pool_list(rados_t cluster, char *buf, size_t len)
   std::list<std::string>::const_iterator i = pools.begin();
   std::list<std::string>::const_iterator p_end = pools.end();
   for (; i != p_end; ++i) {
-    if (len <= 0)
+    if (len == 0)
       break;
     int rl = i->length() + 1;
     strncat(b, i->c_str(), len - 2); // leave space for two NULLs