From: Vincent Bernat Date: Thu, 26 Jan 2012 22:14:28 +0000 (+0100) Subject: Use %zu for printf() when argument is of kind size_t. X-Git-Tag: 0.6.0~49 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=14c929401cf3bd037ef8dc4dfab47f30b417acd5;p=thirdparty%2Flldpd.git Use %zu for printf() when argument is of kind size_t. %zu is valid in C99 and is supported by GNU LibC. We'll see if there exists a portability issue. In this case, %lu and a cast to unsigned long should be used instead. --- diff --git a/src/ctl.c b/src/ctl.c index 6c644cbd..050b7c01 100644 --- a/src/ctl.c +++ b/src/ctl.c @@ -133,8 +133,8 @@ ctl_msg_recv(int fd, enum hmsg_type *type, void **t) goto recv_error; } if (n != hdr.len) { - LLOG_WARNX("received message is too short (%d < %ld)", - n, hdr.len); + LLOG_WARNX("received message is too short (%d < %zu)", + n, hdr.len); goto recv_error; } fcntl(fd, F_SETFL, flags); /* No error check */