Problem: formatting not up to date

Solution: run make clang-format-diff
This commit is contained in:
Luca Boccassi 2020-02-23 17:38:29 +00:00
parent 09476b3d7f
commit 4f45ac135a
5 changed files with 11 additions and 8 deletions

6
include/zmq.h Executable file → Normal file
View File

@ -263,7 +263,7 @@ typedef struct zmq_msg_t
#endif
} zmq_msg_t;
typedef void (zmq_free_fn) (void *data_, void *hint_);
typedef void(zmq_free_fn) (void *data_, void *hint_);
ZMQ_EXPORT int zmq_msg_init (zmq_msg_t *msg_);
ZMQ_EXPORT int zmq_msg_init_size (zmq_msg_t *msg_, size_t size_);
@ -597,7 +597,7 @@ ZMQ_EXPORT void zmq_atomic_counter_destroy (void **counter_p_);
#define ZMQ_HAVE_TIMERS
typedef void (zmq_timer_fn) (int timer_id, void *arg);
typedef void(zmq_timer_fn) (int timer_id, void *arg);
ZMQ_EXPORT void *zmq_timers_new (void);
ZMQ_EXPORT int zmq_timers_destroy (void **timers_p);
@ -634,7 +634,7 @@ ZMQ_EXPORT unsigned long zmq_stopwatch_stop (void *watch_);
/* Sleeps for specified number of seconds. */
ZMQ_EXPORT void zmq_sleep (int seconds_);
typedef void (zmq_thread_fn) (void *);
typedef void(zmq_thread_fn) (void *);
/* Start a thread. Returns a handle to the thread. */
ZMQ_EXPORT void *zmq_threadstart (zmq_thread_fn *func_, void *arg_);

View File

@ -77,9 +77,12 @@
// This macro is used to avoid-variable warning. If used with an expression,
// the sizeof is not evaluated to avoid polluting the assembly code.
#ifdef NDEBUG
#define ASSERT_EXPR_SAFE(x) do { (void)sizeof(x);} while (0)
#define ASSERT_EXPR_SAFE(x) \
do { \
(void) sizeof (x); \
} while (0)
#else
#define ASSERT_EXPR_SAFE(x) assert(x)
#define ASSERT_EXPR_SAFE(x) assert (x)
#endif

View File

@ -46,7 +46,7 @@
// Note that it has to be declared as "C" so that it is the same as
// zmq_free_fn defined in zmq.h.
extern "C" {
typedef void (msg_free_fn) (void *data_, void *hint_);
typedef void(msg_free_fn) (void *data_, void *hint_);
}
namespace zmq

0
src/tcp_connecter.cpp Executable file → Normal file
View File

4
tests/test_reconnect_options.cpp Executable file → Normal file
View File

@ -201,8 +201,8 @@ void reconnect_stop_on_refused ()
int rc = get_monitor_event_with_timeout (sub_mon, &event, &event_address,
2 * 1000);
int limit = 0;
while ((rc != -1) && (++limit < 1000)) {
print_unexpected_event_stderr(event, rc, 0, -1);
while ((rc != -1) && (++limit < 1000)) {
print_unexpected_event_stderr (event, rc, 0, -1);
rc = get_monitor_event_with_timeout (sub_mon, &event, &event_address,
2 * 1000);
}