]> git.sur5r.net Git - openldap/commitdiff
Use buf size macros
authorKurt Zeilenga <kurt@openldap.org>
Sun, 1 Sep 2002 05:59:29 +0000 (05:59 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sun, 1 Sep 2002 05:59:29 +0000 (05:59 +0000)
servers/slapd/back-monitor/conn.c
servers/slapd/back-monitor/time.c

index 070f8524f9927444ddf5b6b68770355694e3b394..5bbaca74e1bcf43960d501240a5b8f414d841416 100644 (file)
@@ -253,9 +253,9 @@ conn_create(
 {
        struct monitorentrypriv *mp;
        struct tm               *ltm;
-       char                    buf[1024];
-       char                    buf2[22];
-       char                    buf3[22];
+       char                    buf[ 1024 ];
+       char                    buf2[ LDAP_LUTIL_GENTIME_BUFSIZE ];
+       char                    buf3[ LDAP_LUTIL_GENTIME_BUFSIZE ];
 
        struct berval           bv[2];
 
@@ -293,10 +293,10 @@ conn_create(
        ldap_pvt_thread_mutex_lock( &gmtime_mutex );
        
        ltm = gmtime( &c->c_starttime );
-       lutil_gentime( buf2, sizeof(buf2), ltm );
+       lutil_gentime( buf2, sizeof( buf2 ), ltm );
                        
        ltm = gmtime( &c->c_activitytime );
-       lutil_gentime( buf3, sizeof(buf2), ltm );
+       lutil_gentime( buf3, sizeof( buf3 ), ltm );
                        
        ldap_pvt_thread_mutex_unlock( &gmtime_mutex );
 
index 7a950b593431d1e8d34fe6bf68b087c69c56b79c..abc29e366a4624101b3a67fac7de97ee81a08638 100644 (file)
@@ -59,7 +59,7 @@ monitor_subsys_time_init(
        struct monitorentrypriv *mp;
        char                    buf[1024];
        struct tm               *tms;
-       char                    tmbuf[20];
+       char                    tmbuf[ LDAP_LUTIL_GENTIME_BUFSIZE ];
 
        /*
         * Note: ltmbuf, ltm are used only if HACK_LOCAL_TIME is defined
@@ -220,7 +220,8 @@ monitor_subsys_time_update(
        Entry                   *e
 )
 {
-       char            stmbuf[20], ctmbuf[20];
+       char            stmbuf[ LDAP_LUTIL_GENTIME_BUFSIZE ],
+                       ctmbuf[ LDAP_LUTIL_GENTIME_BUFSIZE ];
        struct tm       *stm, *ctm;
        Attribute       *a;
        ber_len_t       len;