aboutsummaryrefslogtreecommitdiff
path: root/src/zmq
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2021-06-08 13:21:08 +0800
committerfanquake <fanquake@gmail.com>2021-06-09 19:25:07 +0800
commit9a7cb57bbc61b2dfb772f8486db2a44c1673983a (patch)
treef70b37f53fc646dd89fd99346ef1f3c193acb046 /src/zmq
parent68a89d7a46bf61c2156da3ad68d20095397b943b (diff)
downloadbitcoin-9a7cb57bbc61b2dfb772f8486db2a44c1673983a.tar.xz
zmq: use std::string in zmqError()
Diffstat (limited to 'src/zmq')
-rw-r--r--src/zmq/zmqutil.cpp6
-rw-r--r--src/zmq/zmqutil.h4
2 files changed, 7 insertions, 3 deletions
diff --git a/src/zmq/zmqutil.cpp b/src/zmq/zmqutil.cpp
index f07a4ae9fd..cf05dd81ff 100644
--- a/src/zmq/zmqutil.cpp
+++ b/src/zmq/zmqutil.cpp
@@ -5,10 +5,12 @@
#include <zmq/zmqutil.h>
#include <logging.h>
-
#include <zmq.h>
-void zmqError(const char* str)
+#include <cerrno>
+#include <string>
+
+void zmqError(const std::string& str)
{
LogPrint(BCLog::ZMQ, "zmq: Error: %s, errno=%s\n", str, zmq_strerror(errno));
}
diff --git a/src/zmq/zmqutil.h b/src/zmq/zmqutil.h
index 4c1df5d6db..90c0b00edb 100644
--- a/src/zmq/zmqutil.h
+++ b/src/zmq/zmqutil.h
@@ -5,6 +5,8 @@
#ifndef BITCOIN_ZMQ_ZMQUTIL_H
#define BITCOIN_ZMQ_ZMQUTIL_H
-void zmqError(const char* str);
+#include <string>
+
+void zmqError(const std::string& str);
#endif // BITCOIN_ZMQ_ZMQUTIL_H