mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-15 03:01:09 +08:00
Remove lint
This commit is contained in:
parent
879d3dbc5e
commit
f3880e5633
@ -502,8 +502,8 @@ cldap_parsemsg( LDAP *ld, int msgid, BerElement *ber,
|
||||
|
||||
#ifdef LDAP_DEBUG
|
||||
if ( ldap_debug & LDAP_DEBUG_PACKETS ) {
|
||||
fprintf( stderr, "cldap_parsemsg add message id %d type %d:\n",
|
||||
ldm->lm_msgid, ldm->lm_msgtype );
|
||||
fprintf( stderr, "cldap_parsemsg add message id %ld type %ld:\n",
|
||||
(long) ldm->lm_msgid, (long) ldm->lm_msgtype );
|
||||
ber_log_dump( LDAP_DEBUG_BER, ldap_debug, ldm->lm_ber, 1 );
|
||||
}
|
||||
#endif /* LDAP_DEBUG */
|
||||
|
@ -328,7 +328,7 @@ static int ldap_is_attr_oid ( const char *attr )
|
||||
{
|
||||
int i, c, digit=0;
|
||||
|
||||
for( i=0 ; c = attr[i] ; i++ ) {
|
||||
for( i = 0; (c = attr[i]) != 0; i++ ) {
|
||||
if( c >= '0' && c <= '9' ) {
|
||||
digit=1;
|
||||
|
||||
@ -355,7 +355,7 @@ static int ldap_is_attr_desc ( const char *attr )
|
||||
/* cheap attribute description check */
|
||||
int i, c;
|
||||
|
||||
for( i=0; c = attr[i]; i++ ) {
|
||||
for( i = 0; (c = attr[i]) != 0; i++ ) {
|
||||
if (( c >= '0' && c <= '9' )
|
||||
|| ( c >= 'A' && c <= 'Z' )
|
||||
|| ( c >= 'a' && c <= 'z' )
|
||||
|
@ -71,7 +71,7 @@ ldif_fetch_url(
|
||||
|
||||
total = 0;
|
||||
|
||||
while( bytes = fread( buffer, 1, sizeof(buffer), url ) ) {
|
||||
while( (bytes = fread( buffer, 1, sizeof(buffer), url )) != 0 ) {
|
||||
char *newp = ber_memrealloc( p, total + bytes );
|
||||
if( newp == NULL ) {
|
||||
ber_memfree( p );
|
||||
@ -90,4 +90,3 @@ ldif_fetch_url(
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -336,7 +336,7 @@ int slapd_daemon_init(char *urls, int port, int tls_port )
|
||||
Debug( LDAP_DEBUG_ARGS, "daemon_init: %s (%d/%d)\n",
|
||||
urls ? urls : "<null>", port, tls_port );
|
||||
|
||||
if( rc = sockinit() ) {
|
||||
if( (rc = sockinit()) != 0 ) {
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@ -443,13 +443,14 @@ oc_add_sups(
|
||||
code = oc_add_sups(soc,soc1->soc_sup_oids, err);
|
||||
if ( code )
|
||||
return code;
|
||||
|
||||
if ( code = oc_create_required(soc,
|
||||
soc1->soc_at_oids_must,err) )
|
||||
|
||||
code = oc_create_required(soc,soc1->soc_at_oids_must,err);
|
||||
if ( code )
|
||||
return code;
|
||||
if ( code = oc_create_allowed(soc,
|
||||
soc1->soc_at_oids_may,err) )
|
||||
code = oc_create_allowed(soc,soc1->soc_at_oids_may,err);
|
||||
if ( code )
|
||||
return code;
|
||||
|
||||
nsups++;
|
||||
sups1++;
|
||||
}
|
||||
@ -520,11 +521,11 @@ oc_add(
|
||||
|
||||
soc = (ObjectClass *) ch_calloc( 1, sizeof(ObjectClass) );
|
||||
memcpy( &soc->soc_oclass, oc, sizeof(LDAP_OBJECT_CLASS));
|
||||
if ( code = oc_add_sups(soc,soc->soc_sup_oids,err) )
|
||||
if ( (code = oc_add_sups(soc,soc->soc_sup_oids,err)) != 0 )
|
||||
return code;
|
||||
if ( code = oc_create_required(soc,soc->soc_at_oids_must,err) )
|
||||
if ( (code = oc_create_required(soc,soc->soc_at_oids_must,err)) != 0 )
|
||||
return code;
|
||||
if ( code = oc_create_allowed(soc,soc->soc_at_oids_may,err) )
|
||||
if ( (code = oc_create_allowed(soc,soc->soc_at_oids_may,err)) != 0 )
|
||||
return code;
|
||||
code = oc_insert(soc,err);
|
||||
return code;
|
||||
|
@ -40,10 +40,9 @@ main( int argc, char **argv )
|
||||
if ( argc == 3 ) {
|
||||
if ( strcmp( argv[1], "-b" ) != 0 ) {
|
||||
usage( argv[0] );
|
||||
} else {
|
||||
binary = 1;
|
||||
type = argv[2];
|
||||
}
|
||||
binary = 1;
|
||||
type = argv[2];
|
||||
} else {
|
||||
if ( strcmp( argv[1], "-b" ) == 0 ) {
|
||||
usage( argv[0] );
|
||||
|
Loading…
Reference in New Issue
Block a user