From 1991463b6e14b3cbd0877882235e89a21b085db5 Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Fri, 14 May 2021 11:34:10 +0100 Subject: [PATCH] Clang --- nqptp-clock-sources.c | 3 +-- nqptp-message-handlers.c | 7 ++++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/nqptp-clock-sources.c b/nqptp-clock-sources.c index 5bb3654..a12119a 100644 --- a/nqptp-clock-sources.c +++ b/nqptp-clock-sources.c @@ -163,8 +163,7 @@ void update_master() { int best_so_far = -1; int timing_peer_count = 0; - uint32_t acceptance_mask = - (1 << clock_is_qualified) | (1 << clock_is_a_timing_peer); + uint32_t acceptance_mask = (1 << clock_is_qualified) | (1 << clock_is_a_timing_peer); for (i = 0; i < MAX_CLOCKS; i++) { if ((clocks_private[i].flags & acceptance_mask) == acceptance_mask) { // found a possible clock candidate diff --git a/nqptp-message-handlers.c b/nqptp-message-handlers.c index 9c483fa..2f06273 100644 --- a/nqptp-message-handlers.c +++ b/nqptp-message-handlers.c @@ -213,7 +213,8 @@ void handle_announce(char *buf, ssize_t recv_len, clock_source_private_data *clo void handle_follow_up(char *buf, __attribute__((unused)) ssize_t recv_len, clock_source_private_data *clock_private_info, uint64_t reception_time) { if ((clock_private_info->flags & (1 << clock_is_master)) != 0) { - debug(2, "FOLLOWUP from %" PRIx64 ", %s.", clock_private_info->clock_id, &clock_private_info->ip); + debug(2, "FOLLOWUP from %" PRIx64 ", %s.", clock_private_info->clock_id, + &clock_private_info->ip); struct ptp_follow_up_message *msg = (struct ptp_follow_up_message *)buf; uint64_t packet_clock_id = nctohl(&msg->header.clockIdentity[0]); @@ -303,8 +304,8 @@ void handle_follow_up(char *buf, __attribute__((unused)) ssize_t recv_len, } else if ((clock_private_info->flags & (1 << clock_is_master)) != 0) { update_master_clock_info(clock_private_info->clock_id, (const char *)&clock_private_info->ip, reception_time, offset); - debug(3, "clock: %" PRIx64 ", time: %" PRIu64 ", offset: %" PRId64 ", jitter: %+f ms.", clock_private_info->clock_id, reception_time, offset, - 0.000001 * jitter); + debug(3, "clock: %" PRIx64 ", time: %" PRIu64 ", offset: %" PRId64 ", jitter: %+f ms.", + clock_private_info->clock_id, reception_time, offset, 0.000001 * jitter); } clock_private_info->previous_offset = offset; -- 2.47.2