serrislew commented on a change in pull request #8636:
URL: https://github.com/apache/trafficserver/pull/8636#discussion_r797923982
##########
File path: include/tscpp/util/TsSharedMutex.h
##########
@@ -53,6 +54,30 @@
namespace ts
{
+class Strerror
+{
+public:
+ Strerror(int err_num)
+ {
+ _c_str = strerror_r(err_num, _buf, 256);
+ if (!_c_str) {
Review comment:
some docs show that with the GNU-specific `strerror_r()`, if `err_num`
is unknown, it can return an "unknown error nnn" message which won't make
`_c_str` null, making the conditional think that `strerror_r()` did not fail
when it did. Maybe use the XSI-compliant version (returning int) and returning
`_buf` which also has the error string
--
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]