diff options
author | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2017-02-12 16:40:38 +0100 |
---|---|---|
committer | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2017-02-12 22:19:50 +0100 |
commit | cf5087a8397e379d059998b27ef86a1bb68d70ff (patch) | |
tree | f4fca20a30f47a42df41adfe1f2b4bda8a54b19c /src/ipcpd/normal | |
parent | 98a15feabb6a14e52a54a09dfed58d55e0f99884 (diff) | |
download | ouroboros-cf5087a8397e379d059998b27ef86a1bb68d70ff.tar.gz ouroboros-cf5087a8397e379d059998b27ef86a1bb68d70ff.zip |
include: Use width in endian naming convention
ntohll and ntohl have been renamed ntoh64 and ntoh32, htonll and htonl
have been renamed hton64 and hton32.
Diffstat (limited to 'src/ipcpd/normal')
-rw-r--r-- | src/ipcpd/normal/enroll.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ipcpd/normal/enroll.c b/src/ipcpd/normal/enroll.c index cea33bf2..94e171c0 100644 --- a/src/ipcpd/normal/enroll.c +++ b/src/ipcpd/normal/enroll.c @@ -106,8 +106,8 @@ int enroll_handle(int fd) struct timespec t; uint64_t buf[2]; clock_gettime(CLOCK_REALTIME, &t); - buf[0] = htonll(t.tv_sec); - buf[1] = htonll(t.tv_nsec); + buf[0] = hton64(t.tv_sec); + buf[1] = hton64(t.tv_nsec); cdap_reply_send(ci, key, 0, buf, sizeof(buf)); free(name); continue; @@ -214,8 +214,8 @@ int enroll_boot(char * dst_name) assert (len == 2 * sizeof (uint64_t)); - rtt.tv_sec = ntohll(((uint64_t *) data)[0]); - rtt.tv_nsec = ntohll(((uint64_t *) data)[1]); + rtt.tv_sec = ntoh64(((uint64_t *) data)[0]); + rtt.tv_nsec = ntoh64(((uint64_t *) data)[1]); if (abs(ts_diff_ms(&t0, &rtt)) - delta_t > ENROLL_WARN_TIME_OFFSET) log_warn("Clock offset above threshold."); |