1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

cleanup: add FMTssize_t

Add define to print nicely ssize_t type.
This commit is contained in:
Zdenek Kabelac 2015-08-18 12:59:13 +02:00
parent 3d08a49790
commit 58f8f29c41
2 changed files with 3 additions and 1 deletions

View File

@ -37,11 +37,13 @@
/* Define some portable printing types */
#define PRIsize_t "zu"
#define PRIssize_t "zd"
#define PRIptrdiff_t "td"
#define PRIpid_t PRId32
/* For convenience */
#define FMTsize_t "%" PRIsize_t
#define FMTssize_t "%" PRIssize_t
#define FMTptrdiff_t "%" PRIptrdiff_t
#define FMTpid_t "%" PRIpid_t

View File

@ -590,7 +590,7 @@ static int _do_timerfd_wait(void)
/* read(2) on a timerfd descriptor is guaranteed to return 8 bytes. */
if (bytes != 8)
log_error("Unexepcted byte count on timerfd read: %d", bytes);
log_error("Unexpected byte count on timerfd read: " FMTssize_t, bytes);
/* FIXME: attempt to rebase clock? */
if (expired > 1)