zmq: use std::string in zmqError()

This commit is contained in:
fanquake
2021-06-08 13:21:08 +08:00
parent 68a89d7a46
commit 9a7cb57bbc
2 changed files with 7 additions and 3 deletions

View File

@@ -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));
}

View File

@@ -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