]> git.sur5r.net Git - openldap/commitdiff
Format fixes (%d<->%lu etc)
authorHallvard Furuseth <hallvard@openldap.org>
Wed, 6 Jul 2005 05:53:02 +0000 (05:53 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Wed, 6 Jul 2005 05:53:02 +0000 (05:53 +0000)
servers/slapd/overlays/accesslog.c
servers/slapd/overlays/pcache.c
servers/slapd/overlays/ppolicy.c
servers/slapd/slapi/slapi_utils.c

index 5a6b5db8edc152ce29fc556eff5e33e5744f15d6..c17996f706df23ef40da5e5941bbd3640e7389a0 100644 (file)
@@ -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 )) 
index a8d8a2c6b8305b219374a565be7cd45b72a2fc63..5d2d1247e2a914593fb2606462baac76132af1f4 100644 (file)
@@ -1716,7 +1716,7 @@ pc_cf_gen( ConfigArgs *c )
                        break;
                case PC_TEMP:
                        for (i=0; i<cm->numtemplates; 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;
index f5bc8ce0b9bad254a2ab330f22d1dc82a949c7db..af9804807ab3faf5477719284e6c7d53b37f8066 100644 (file)
@@ -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);
 
index ca7e8c45da3d21ad49a33879f603a739a847e0b5..6689fb41b714544f31173a508eb8ca2055681835 100644 (file)
@@ -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;