]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
Use %zu for printf() when argument is of kind size_t.
authorVincent Bernat <bernat@luffy.cx>
Thu, 26 Jan 2012 22:14:28 +0000 (23:14 +0100)
committerVincent Bernat <bernat@luffy.cx>
Thu, 26 Jan 2012 22:27:51 +0000 (23:27 +0100)
%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.

src/ctl.c

index 6c644cbd0aac99ef5c0d09a8fedc7ff9bb6d0c01..050b7c01ba767b3b3d6bb5aa0a6c62075a93815c 100644 (file)
--- 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 */