ywkaras commented on a change in pull request #8636:
URL: https://github.com/apache/trafficserver/pull/8636#discussion_r796191216



##########
File path: include/tscpp/util/TsSharedMutex.h
##########
@@ -53,6 +54,36 @@
 
 namespace ts
 {
+class Strerror
+{
+public:
+  Strerror(int err_num)
+  {
+    _c_str = strerror_r(err_num, _buf, 256);
+    if (!_c_str) {
+      _c_str = "strerror_r() call failed";
+    } else {
+      _buf[255] = '\0';
+    }
+  }
+
+  char const *
+  c_str() const
+  {
+    return (_c_str);
+  }
+
+private:
+  char _buf[256];
+  char const *_c_str;
+};
+
+#if F
+#error "F preprocessor symbol defined"
+#endif
+
+#define F(FUNC_NAME, PTR, ERR_NUM) TSFatal("%s(%p) failed: %s (%d)", 
(FUNC_NAME), (PTR), Strerror(ERR_NUM).c_str(), (ERR_NUM));

Review comment:
       Brain fart, this review comment is legally elder abuse.
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to