Skip to content

Commit 9a7cb57

Browse files
committed
zmq: use std::string in zmqError()
1 parent 68a89d7 commit 9a7cb57

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/zmq/zmqutil.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55
#include <zmq/zmqutil.h>
66

77
#include <logging.h>
8-
98
#include <zmq.h>
109

11-
void zmqError(const char* str)
10+
#include <cerrno>
11+
#include <string>
12+
13+
void zmqError(const std::string& str)
1214
{
1315
LogPrint(BCLog::ZMQ, "zmq: Error: %s, errno=%s\n", str, zmq_strerror(errno));
1416
}

src/zmq/zmqutil.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
#ifndef BITCOIN_ZMQ_ZMQUTIL_H
66
#define BITCOIN_ZMQ_ZMQUTIL_H
77

8-
void zmqError(const char* str);
8+
#include <string>
9+
10+
void zmqError(const std::string& str);
911

1012
#endif // BITCOIN_ZMQ_ZMQUTIL_H

0 commit comments

Comments
 (0)