diff options
author | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2017-02-09 23:17:13 +0100 |
---|---|---|
committer | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2017-02-09 23:25:13 +0100 |
commit | 773502eb6c8dd6fc1611a2140786e281d2af404a (patch) | |
tree | 886f59fac040429c3977bc376c8f58e7c7010435 /src/ipcpd/normal/main.c | |
parent | d3a8f3e1b2db0894568f5002abf35599324afe9e (diff) | |
download | ouroboros-773502eb6c8dd6fc1611a2140786e281d2af404a.tar.gz ouroboros-773502eb6c8dd6fc1611a2140786e281d2af404a.zip |
ipcpd: Print size_t and uint64_t in portable way
On 32-bit systems size_t is different than on 64 bit systems. The
correct way to print a size_t is with %z. uint64_t is printed portably
with the PRIu64 macro.
Diffstat (limited to 'src/ipcpd/normal/main.c')
-rw-r--r-- | src/ipcpd/normal/main.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ipcpd/normal/main.c b/src/ipcpd/normal/main.c index b69bfe28..69f24fce 100644 --- a/src/ipcpd/normal/main.c +++ b/src/ipcpd/normal/main.c @@ -47,6 +47,7 @@ #include <string.h> #include <errno.h> #include <assert.h> +#include <inttypes.h> #define DLR "/" #define DIF_PATH DLR DIF_NAME @@ -146,7 +147,7 @@ static int boot_components(void) len = rib_read(DIF_PATH, &buf, 256); if (len < 0) { - log_err("Failed to read DIF name: %ld.", len); + log_err("Failed to read DIF name: %zd.", len); return -1; } @@ -182,7 +183,7 @@ static int boot_components(void) return -1; } - log_dbg("IPCP got address %lu.", ipcpi.address); + log_dbg("IPCP got address %" PRIu64 ".", ipcpi.address); log_dbg("Starting ribmgr."); |