From f841c364ebca7199c588088c80896a2ecef6f3b2 Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Wed, 6 Jul 2005 05:53:02 +0000 Subject: [PATCH] Format fixes (%d<->%lu etc) --- servers/slapd/overlays/accesslog.c | 2 +- servers/slapd/overlays/pcache.c | 2 +- servers/slapd/overlays/ppolicy.c | 4 ++-- servers/slapd/slapi/slapi_utils.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/servers/slapd/overlays/accesslog.c b/servers/slapd/overlays/accesslog.c index 5a6b5db8ed..c17996f706 100644 --- a/servers/slapd/overlays/accesslog.c +++ b/servers/slapd/overlays/accesslog.c @@ -670,7 +670,7 @@ static Entry *accesslog_entry( Operation *op, int logop ) { attr_merge_one( e, ad_reqType, &lo->word, NULL ); } - rdn.bv_len = sprintf( rdn.bv_val, "%d", op->o_connid ); + rdn.bv_len = sprintf( rdn.bv_val, "%lu", op->o_connid ); attr_merge_one( e, ad_reqSession, &rdn, NULL ); if ( BER_BVISNULL( &op->o_dn )) diff --git a/servers/slapd/overlays/pcache.c b/servers/slapd/overlays/pcache.c index a8d8a2c6b8..5d2d1247e2 100644 --- a/servers/slapd/overlays/pcache.c +++ b/servers/slapd/overlays/pcache.c @@ -1716,7 +1716,7 @@ pc_cf_gen( ConfigArgs *c ) break; case PC_TEMP: for (i=0; inumtemplates; i++) { - bv.bv_len = sprintf( c->msg, " %d %d", + bv.bv_len = sprintf( c->msg, " %d %ld", qm->templates[i].attr_set_index, qm->templates[i].ttl ); bv.bv_len += qm->templates[i].querystr.bv_len + 2; diff --git a/servers/slapd/overlays/ppolicy.c b/servers/slapd/overlays/ppolicy.c index f5bc8ce0b9..af9804807a 100644 --- a/servers/slapd/overlays/ppolicy.c +++ b/servers/slapd/overlays/ppolicy.c @@ -629,9 +629,9 @@ make_pwd_history_value( char *timebuf, struct berval *bv, Attribute *pa ) int nlen; snprintf( str, MAX_PWD_HISTORY_SZ, - "%s#%s#%d#", timebuf, + "%s#%s#%lu#", timebuf, pa->a_desc->ad_type->sat_syntax->ssyn_oid, - pa->a_nvals[0].bv_len ); + (unsigned long) pa->a_nvals[0].bv_len ); str[MAX_PWD_HISTORY_SZ-1] = 0; nlen = strlen(str); diff --git a/servers/slapd/slapi/slapi_utils.c b/servers/slapd/slapi/slapi_utils.c index ca7e8c45da..6689fb41b7 100644 --- a/servers/slapd/slapi/slapi_utils.c +++ b/servers/slapd/slapi/slapi_utils.c @@ -2308,7 +2308,7 @@ slapi_timer_get_time( char *label ) { #ifdef LDAP_SLAPI unsigned long start = slapi_timer_current_time(); - printf("%10ld %10ld usec %s\n", start, 0, label); + printf("%10ld %10d usec %s\n", start, 0, label); return start; #else /* LDAP_SLAPI */ return 0; -- 2.39.5