]> git.ipfire.org Git - thirdparty/nqptp.git/commitdiff
Clang
authorMike Brady <4265913+mikebrady@users.noreply.github.com>
Fri, 14 May 2021 10:34:10 +0000 (11:34 +0100)
committerMike Brady <4265913+mikebrady@users.noreply.github.com>
Fri, 14 May 2021 10:34:10 +0000 (11:34 +0100)
nqptp-clock-sources.c
nqptp-message-handlers.c

index 5bb36543f6e6e108a525a71834f1a47b438bbf1f..a12119abdab20fa57e4ed48c9fb1e8fd300a16a6 100644 (file)
@@ -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
index 9c483fa58bf42232c03c3fbdd77f454da50b1820..2f0627374dae19f539217258769c9b147ddd9abd 100644 (file)
@@ -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;