From: Pierre Habouzit Date: Sun, 11 May 2008 18:45:02 +0000 (+0200) Subject: 64bits fix: head->width is a size_t, needs %zd format. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ad47fe55ea64f694e53da06dda066a0eb22bb29;p=dpkg 64bits fix: head->width is a size_t, needs %zd format. * lib/showpkg.c (show1package): Use %zd instead of %d in sprintf() call with a size_t parameter. --- diff --git a/ChangeLog b/ChangeLog index 699d4b10..60034cb9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-05-11 Pierre Habouzit + + * lib/showpkg.c (show1package): Use %zd instead of %d in sprintf() + call with a size_t parameter. + 2008-05-11 Pierre Habouzit * scripts/update-alternatives.pl: add a --query option that works like diff --git a/lib/showpkg.c b/lib/showpkg.c index 9025807a..74e57c8c 100644 --- a/lib/showpkg.c +++ b/lib/showpkg.c @@ -216,7 +216,7 @@ void show1package(const struct lstitem* head, struct pkginfo *pkg) { ok=0; if (head->width>0) - snprintf(fmt,16,"%%%s%ds", + snprintf(fmt,16,"%%%s%zds", ((head->pad) ? "-" : ""), head->width); else strcpy(fmt, "%s");