From: Adam C. Emerson Date: Mon, 10 Apr 2017 19:35:23 +0000 (-0400) Subject: cls: Fix order of operations of std::string constructor X-Git-Tag: v12.0.2~94^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=7f0a5498c63aa0e54add04034c8f590ce93bdbb0;p=ceph.git cls: Fix order of operations of std::string constructor Presumably the intent was to create a string with 128 '1's, rather than a string with 49 '\200's. Signed-off-by: Adam C. Emerson --- diff --git a/src/cls/journal/cls_journal_types.cc b/src/cls/journal/cls_journal_types.cc index 6dd5664888cf..c8757e20a90a 100644 --- a/src/cls/journal/cls_journal_types.cc +++ b/src/cls/journal/cls_journal_types.cc @@ -100,7 +100,7 @@ void Client::dump(Formatter *f) const { void Client::generate_test_instances(std::list &o) { bufferlist data; - data.append(std::string('1', 128)); + data.append(std::string(128, '1')); o.push_back(new Client()); o.push_back(new Client("id", data)); @@ -136,7 +136,7 @@ void Tag::generate_test_instances(std::list &o) { o.push_back(new Tag()); bufferlist data; - data.append(std::string('1', 128)); + data.append(std::string(128, '1')); o.push_back(new Tag(123, 234, data)); }