]> git.sur5r.net Git - openldap/commitdiff
Fix for previous commit
authorLuke Howard <lukeh@openldap.org>
Mon, 18 Jul 2005 14:11:55 +0000 (14:11 +0000)
committerLuke Howard <lukeh@openldap.org>
Mon, 18 Jul 2005 14:11:55 +0000 (14:11 +0000)
servers/slapd/back-bdb/config.c

index 232e996d49355353b2127ea716ead328cbdd9178..82169471e98f9e1a5f49a2e1806cefd140d93358 100644 (file)
@@ -356,12 +356,12 @@ bdb_cf_gen(ConfigArgs *c)
                                        bdb->bi_flags |= BDB_HAS_CONFIG;
                                        while ( fgets( buf, sizeof(buf), f )) {
                                                ber_str2bv( buf, 0, 1, &bv );
-                                               if ( bv.bv_val > 0 && bv.bv_val[bv.bv_len-1] == '\n' ) {
+                                               if ( bv.bv_len > 0 && bv.bv_val[bv.bv_len-1] == '\n' ) {
                                                        bv.bv_len--;
                                                        bv.bv_val[bv.bv_len] = '\0';
                                                }
                                                /* shouldn't need this, but ... */
-                                               if ( bv.bv_val > 0 && bv.bv_val[bv.bv_len-1] == '\r' ) {
+                                               if ( bv.bv_len > 0 && bv.bv_val[bv.bv_len-1] == '\r' ) {
                                                        bv.bv_len--;
                                                        bv.bv_val[bv.bv_len] = '\0';
                                                }