diff options
author | Sage Weil <sage@inktank.com> | 2013-09-26 18:30:06 -0700 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-09-26 18:30:06 -0700 |
commit | 0bfda470367e9a5d6be931e31d6e0e74616b3c77 (patch) | |
tree | 10ac4dc74d7971d52dc8509d9f6e906f5066d506 | |
parent | 493427ddd6b443a511182565a574253c1d864c6f (diff) | |
download | ceph-0bfda470367e9a5d6be931e31d6e0e74616b3c77.tar.gz |
test/common/get_command_descriptions: null terminate c string
This fixes a bunch of trailing goop I see on my machine.
Signed-off-by: Sage Weil <sage@inktank.com>
-rw-r--r-- | src/test/common/get_command_descriptions.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/common/get_command_descriptions.cc b/src/test/common/get_command_descriptions.cc index afca8254c42..aff5575b8c4 100644 --- a/src/test/common/get_command_descriptions.cc +++ b/src/test/common/get_command_descriptions.cc @@ -50,7 +50,7 @@ static void json_print(const MonCommand *mon_commands, int size) Formatter *f = new_formatter("json"); get_command_descriptions(mon_commands, size, f, &rdata); delete f; - string data(rdata.c_str()); + string data(rdata.c_str(), rdata.length()); dout(0) << data << dendl; } |