Fix format string problems on 64-bit archs.

This commit is contained in:
naddy 2002-09-24 10:17:47 +00:00
parent fba289fc35
commit adf40e56ed
3 changed files with 49 additions and 0 deletions

View File

@ -0,0 +1,25 @@
$OpenBSD: patch-activutil_c,v 1.1 2002/09/24 10:17:47 naddy Exp $
--- activutil.c.orig Tue Sep 24 01:17:19 2002
+++ activutil.c Tue Sep 24 01:19:28 2002
@@ -293,6 +293,7 @@ readactive(void)
{
char *buf;
/*@dependent@*/ char *p, *q, *r;
+ unsigned long lu;
off_t n;
struct stat st;
FILE *f;
@@ -379,11 +380,12 @@ readactive(void)
*q++ = '\0';
g->name = critstrdup(p, "readactive");
- if (sscanf(r, "%lu %lu %lu", &g->last, &g->first, &g->age) != 3) {
+ if (sscanf(r, "%lu %lu %lu", &g->last, &g->first, &lu) != 3) {
syslog(LOG_ERR,
"Groupinfo file possibly truncated or damaged: %s", p);
break;
}
+ g->age = lu;
if (g->first == 0)
g->first = 1; /* pseudoarticle */
if (g->last == 0)

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-nntpd_c,v 1.1 2002/09/24 10:17:47 naddy Exp $
--- nntpd.c.orig Tue Sep 24 01:20:12 2002
+++ nntpd.c Tue Sep 24 01:20:53 2002
@@ -828,7 +828,7 @@ list(struct newsgroup *g, int what, cons
printf("%s\t%s\r\n", g->name, g->desc ? g->desc : "-x-");
break;
case 2:
- printf("%s %lu news@%s\r\n", g->name, g->age, fqdn);
+ printf("%s %lu news@%s\r\n", g->name, (unsigned long)g->age, fqdn);
break;
default:
break;

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-texpire_c,v 1.1 2002/09/24 10:17:47 naddy Exp $
--- texpire.c.orig Tue Sep 24 01:21:00 2002
+++ texpire.c Tue Sep 24 01:21:17 2002
@@ -328,7 +328,7 @@ dogroup(struct newsgroup *g, const char
if (debugmode)
syslog(LOG_DEBUG,
"%s: expire %lu, low water mark %lu, high water mark %lu",
- name, expire, first, last);
+ name, (unsigned long)expire, first, last);
if (expire <= 0)
return;