From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Fri, 14 May 2021 10:34:10 +0000 (+0100) Subject: Clang X-Git-Tag: 1.2~131 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1991463b6e14b3cbd0877882235e89a21b085db5;p=thirdparty%2Fnqptp.git Clang --- 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;