]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
buffer: do not append trailing newline when appending empty istream
authorSage Weil <sage@inktank.com>
Mon, 13 Jan 2014 23:50:29 +0000 (15:50 -0800)
committerSage Weil <sage@inktank.com>
Mon, 13 Jan 2014 23:52:13 +0000 (15:52 -0800)
commit1308225cc425208edd44f8fc5fd3cb34268afa14
tree8d4a480d6005bf29ae6b3a65dd3163f8b1672a9d
parent196e3d62780554e5e21994d2cee0af9a7c873f07
buffer: do not append trailing newline when appending empty istream

If we call

 bl.append(some_istream);

do not include a \n if the istream is empty (which is apparently is not
the same thing as eof).  This was causing 'ceph pg getmap' to include a
trailing newline.

Probably we don't want this newline at all!  But all callers need to be
fixed for that change.

Signed-off-by: Sage Weil <sage@inktank.com>
src/common/buffer.cc