sink.ctf.fs: use bt2c::Logger
[babeltrace.git] / src / cpp-common / bt2c / logging.hpp
index 274c2fae51082b0ed0e9d406448b9d1141397a28..df5cb494d9d50b127feeeac32e9a4386fd662a06 100644 (file)
@@ -593,6 +593,14 @@ private:
     mutable std::vector<char> _mBuf;
 };
 
+/*
+ * Returns `s` if it's not `nullptr`, or the `(null)` string otherwise.
+ */
+inline const char *maybeNull(const char * const s) noexcept
+{
+    return s ? s : "(null)";
+}
+
 } /* namespace bt2c */
 
 /* Internal: default logger name */
This page took 0.027101 seconds and 4 git commands to generate.