bt2c::Logger::_logStrNoThrow(): use `msg`, not `_mBuf.data()`
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 2 Feb 2024 20:34:03 +0000 (15:34 -0500)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Mon, 5 Feb 2024 18:11:59 +0000 (13:11 -0500)
By chance those were always the same, but from the _logStrNoThrow()
point of view, it must use `msg`.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: Ie91ea9e6ff3b8f26c214904aaa9bd036b8dacfcb
Reviewed-on: https://review.lttng.org/c/babeltrace/+/11741

src/cpp-common/bt2c/logging.hpp

index beb64c26a4d680781e2c6566847b52eaca18e039..159e909bb66e48150f57e4b9e1da48808f6616e8 100644 (file)
@@ -559,17 +559,17 @@ private:
         if (AppendCauseV) {
             if (_mSelfMsgIter) {
                 bt_current_thread_error_append_cause_from_message_iterator(
-                    _mSelfMsgIter->libObjPtr(), fileName, lineNo, "%s%s", initMsg, _mBuf.data());
+                    _mSelfMsgIter->libObjPtr(), fileName, lineNo, "%s%s", initMsg, msg);
             } else if (_mSelfComp) {
                 bt_current_thread_error_append_cause_from_component(
-                    _mSelfComp->libObjPtr(), fileName, lineNo, "%s%s", initMsg, _mBuf.data());
+                    _mSelfComp->libObjPtr(), fileName, lineNo, "%s%s", initMsg, msg);
             } else if (_mSelfCompCls) {
                 bt_current_thread_error_append_cause_from_component_class(
-                    _mSelfCompCls->libObjPtr(), fileName, lineNo, "%s%s", initMsg, _mBuf.data());
+                    _mSelfCompCls->libObjPtr(), fileName, lineNo, "%s%s", initMsg, msg);
             } else {
                 BT_ASSERT(_mModuleName);
-                bt_current_thread_error_append_cause_from_unknown(
-                    _mModuleName->data(), fileName, lineNo, "%s%s", initMsg, _mBuf.data());
+                bt_current_thread_error_append_cause_from_unknown(_mModuleName->data(), fileName,
+                                                                  lineNo, "%s%s", initMsg, msg);
             }
         }
     }
This page took 0.025341 seconds and 4 git commands to generate.