]> err.no Git - util-linux/commitdiff
tailf: fix printf format
authorMike Frysinger <vapier@gentoo.org>
Sat, 21 Nov 2009 02:41:14 +0000 (21:41 -0500)
committerKarel Zak <kzak@redhat.com>
Mon, 23 Nov 2009 09:14:56 +0000 (10:14 +0100)
ssize_t types are shown with %zd, not %ld.

Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
text-utils/tailf.c

index ec6e1c46c4b938c3cba5619ea18e0f61baf1000f..75998ce7353b3aeca4c34360873a8612920583b2 100644 (file)
@@ -106,7 +106,7 @@ roll_file(const char *filename, off_t *size)
                while ((rc = read(fd, buf, sizeof(buf))) > 0) {
                        wc = write(STDOUT_FILENO, buf, rc);
                        if (rc != wc)
-                               warnx(_("incomplete write to \"%s\" (written %ld, expected %ld)\n"),
+                               warnx(_("incomplete write to \"%s\" (written %zd, expected %zd)\n"),
                                        filename, wc, rc);
                }
                fflush(stdout);