0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-03-06 14:19:59 -05:00

zmq: use std::string in zmqError()

This commit is contained in:
fanquake 2021-06-08 13:21:08 +08:00
parent 68a89d7a46
commit 9a7cb57bbc
No known key found for this signature in database
GPG key ID: 2EEB9F5CC09526C1
2 changed files with 7 additions and 3 deletions

View file

@ -5,10 +5,12 @@
#include <zmq/zmqutil.h> #include <zmq/zmqutil.h>
#include <logging.h> #include <logging.h>
#include <zmq.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)); LogPrint(BCLog::ZMQ, "zmq: Error: %s, errno=%s\n", str, zmq_strerror(errno));
} }

View file

@ -5,6 +5,8 @@
#ifndef BITCOIN_ZMQ_ZMQUTIL_H #ifndef BITCOIN_ZMQ_ZMQUTIL_H
#define 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 #endif // BITCOIN_ZMQ_ZMQUTIL_H