Remove lint

This commit is contained in:
Hallvard Furuseth 1999-09-06 04:42:20 +00:00
parent 879d3dbc5e
commit f3880e5633
6 changed files with 17 additions and 18 deletions

View File

@ -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 */

View File

@ -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' )

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;

View File

@ -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] );