#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 */
{
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;
/* 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' )
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 );
return 0;
}
-
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;
}
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++;
}
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;
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] );