]> git.sur5r.net Git - openldap/commitdiff
Minor cleanup
authorKurt Zeilenga <kurt@openldap.org>
Wed, 14 Jun 2000 21:11:56 +0000 (21:11 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 14 Jun 2000 21:11:56 +0000 (21:11 +0000)
libraries/liblber/io.c
servers/slapd/add.c
servers/slapd/connection.c
servers/slapd/dn.c

index 859b70c13726b03a809acf1f8b8d3e07e1445ed5..27220e42675535c913ead6a0c7d23f4bee630745 100644 (file)
@@ -231,9 +231,9 @@ ber_flush( Sockbuf *sb, BerElement *ber, int freeit )
 
        if ( sb->sb_debug ) {
                ber_log_printf( LDAP_DEBUG_ANY, sb->sb_debug,
-                       "ber_flush: %ld bytes to sd %ld%s\n", towrite,
-                   (long) sb->sb_fd, ber->ber_rwptr != ber->ber_buf ?
-                   " (re-flush)" : "" );
+                       "ber_flush: %ld bytes to sd %ld%s\n",
+                       towrite, (long) sb->sb_fd,
+                       ber->ber_rwptr != ber->ber_buf ?  " (re-flush)" : "" );
                ber_log_bprint( LDAP_DEBUG_PACKETS, sb->sb_debug,
                        ber->ber_rwptr, towrite );
        }
@@ -523,8 +523,10 @@ ber_get_next(
                }
                do {
                        /* reading the tag... */
-                       if (ber_int_sb_read( sb, ber->ber_rwptr, 1)<=0)
+                       if (ber_int_sb_read( sb, ber->ber_rwptr, 1)<=0) {
                                return LBER_DEFAULT;
+                       }
+
                        if (! (ber->ber_rwptr[0] & LBER_MORE_TAG_MASK) ) {
                                ber->ber_tag>>=sizeof(ber->ber_tag) -
                                  ((char *) &ber->ber_tag - ber->ber_rwptr);
@@ -532,6 +534,7 @@ ber_get_next(
                                goto get_lenbyte;
                        }
                } while( PTR_IN_VAR(ber->ber_rwptr, ber->ber_tag ));
+
                errno = ERANGE; /* this is a serious error. */
                return LBER_DEFAULT;
        }
index 1b7333f5cff4e4a5c55473db1d3143ffb78ea43f..b9b2c63f7e63ea0bcba743ef7f04d91b708f528d 100644 (file)
@@ -86,7 +86,7 @@ do_add( Connection *conn, Operation *op )
        e->e_attrs = NULL;
        e->e_private = NULL;
 
-       Debug( LDAP_DEBUG_ARGS, "    do_add: ndn (%s)\n", e->e_ndn, 0, 0 );
+       Debug( LDAP_DEBUG_ARGS, "do_add: ndn (%s)\n", e->e_ndn, 0, 0 );
 
        /* get the attrs */
        for ( tag = ber_first_element( ber, &len, &last ); tag != LBER_DEFAULT;
index f1e075eb4582be5f363c928a5f4d14cd4878853c..a86d9b0f377aa0b08c8096e430144372508c76fe 100644 (file)
@@ -975,9 +975,9 @@ connection_input(
        }
 
        errno = 0;
-       if ( (tag = ber_get_next( conn->c_sb, &len, conn->c_currentber ))
-           != LDAP_TAG_MESSAGE )
-       {
+
+       tag = ber_get_next( conn->c_sb, &len, conn->c_currentber );
+       if ( tag != LDAP_TAG_MESSAGE ) {
                int err = errno;
                ber_socket_t    sd;
 
index 72891cfb47f59c759a6bdbd522c5d345ec8c6a40..a20d5a2cb5c845aff9bf52cb8487299ccc42ed61 100644 (file)
@@ -137,18 +137,21 @@ dn_validate( char *dn )
                                *d++ = *s;
                        }
                        break;
+
                case B4SEPARATOR:
                        if ( RDN_SEPARATOR( *s ) ) {
                                state = B4TYPE;
                                *d++ = *s;
                        }
                        break;
+
                default:
                        dn = NULL;
                        Debug( LDAP_DEBUG_ANY,
                            "dn_validate - unknown state %d\n", state, 0, 0 );
                        break;
                }
+
                if ( *s == '\\' ) {
                        gotesc = 1;
                } else {