]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
buffer::ptr::cmp only compares up to the smallest length
authorLoic Dachary <loic@dachary.org>
Sun, 17 Feb 2013 08:41:09 +0000 (09:41 +0100)
committerSage Weil <sage@inktank.com>
Sun, 17 Feb 2013 17:46:35 +0000 (09:46 -0800)
commitd20bf07eca9583447fb6fc98b09f321979bac8ee
tree5fc59cd64439dda0ae99c167816f772635f19921
parentfecc3c3abf1176f4c7938e161559ea2db59f1cff
buffer::ptr::cmp only compares up to the smallest length

When running

  bufferptr a("A", 1);
  bufferptr ab("AB", 2);
  a.cmp(ab);

it returned zero because. cmp only compared up to the length of the
smallest buffer and returned if they are identical. The function is
modified to compare the length of the buffers instead of returning.

http://tracker.ceph.com/issues/4170 refs #4170

Signed-off-by: Loic Dachary <loic@dachary.org>
src/common/buffer.cc
src/test/bufferlist.cc