LDAP *ld,
char *dn));
+int
main( argc, argv )
int argc;
char **argv;
static char *read_one_record LDAP_P(( FILE *fp ));
+int
main( int argc, char **argv )
{
char *infile, *rbuf, *start, *p, *q;
char *rdn,
int remove)); /* flag: remove old RDN */
+int
main( argc, argv )
int argc;
char **argv;
static int skipsortattr = 0;
static int verbose, not, includeufn, allow_binary, vals2tmp, ldif;
+int
main( argc, argv )
int argc;
char **argv;
unsigned char xbyte;
unsigned long tag;
char *tagp;
- int i;
+ unsigned int i;
if ( ber_read( ber, (char *) &xbyte, 1 ) != 1 )
return( LBER_DEFAULT );
char *s, **ss, ***sss;
struct berval ***bv, **bvp, *bval;
int *i, j;
- long *l, rc, tag;
- unsigned long len;
+ long *l;
+ unsigned long rc, tag, len;
#if defined( HAVE_STDARG_H ) && __STDC__
va_start( ap, fmt );
unsigned char xbyte;
unsigned long tag;
char *tagp;
- int i;
+ unsigned int i;
if ( BerRead( sb, (char *) &xbyte, 1 ) != 1 )
return( LBER_DEFAULT );
LDAPMessage *lm;
BerElement ber;
long along;
- int rc;
+ unsigned long rc;
Debug( LDAP_DEBUG_TRACE, "ldap_result2error\n", 0, 0, 0 );
if(ldp == NULL) {
ld = &openldap_ld_globals;
} else {
- ld = ld;
+ ld = ldp;
}
switch(option) {
if(ldp == NULL) {
ld = &openldap_ld_globals;
} else {
- ld = ld;
+ ld = ldp;
}
switch(option) {
#ifdef LDAP_REFERRALS
static int read1msg LDAP_P(( LDAP *ld, int msgid, int all, Sockbuf *sb, LDAPConn *lc,
LDAPMessage **result ));
-static int build_result_ber LDAP_P(( LDAP *ld, BerElement *ber, LDAPRequest *lr ));
+static unsigned long build_result_ber LDAP_P(( LDAP *ld, BerElement *ber, LDAPRequest *lr ));
static void merge_error_info LDAP_P(( LDAP *ld, LDAPRequest *parentr, LDAPRequest *lr ));
#else /* LDAP_REFERRALS */
static int read1msg LDAP_P(( LDAP *ld, int msgid, int all, Sockbuf *sb,
#ifdef LDAP_REFERRALS
-static int
+static unsigned long
build_result_ber( LDAP *ld, BerElement *ber, LDAPRequest *lr )
{
unsigned long len;
if ( ber_printf( ber, "{it{ess}}", lr->lr_msgid,
(long)lr->lr_res_msgtype, lr->lr_res_errno,
lr->lr_res_matched ? lr->lr_res_matched : "",
- lr->lr_res_error ? lr->lr_res_error : "" ) == LBER_ERROR ) {
+ lr->lr_res_error ? lr->lr_res_error : "" ) == -1 ) {
return( LBER_ERROR );
}
};
static int (*et_cmp_fn) LDAP_P(( char *a, char *b ));
-static int et_cmp LDAP_P(( void *aa, void *bb));
+static int et_cmp LDAP_P(( const void *aa, const void *bb));
int
static int
et_cmp(
- void *aa,
- void *bb
+ const void *aa,
+ const void *bb
)
{
int i, rc;
- struct entrything *a = (struct entrything *)aa;
- struct entrything *b = (struct entrything *)bb;
+ const struct entrything *a = (const struct entrything *)aa;
+ const struct entrything *b = (const struct entrything *)bb;
if ( a->et_vals == NULL && b->et_vals == NULL )
return( 0 );
sprintf( buf + strlen( buf ),
"%s\">Move Up To <EM>%s</EM></A>%s<BR>",
( vals[ 1 ] == NULL ) ? "??one" : "",
- ( untagged != NULL ) ? untagged + 1 : vals[ 1 ], eol, eol );
+ ( untagged != NULL ) ? untagged + 1 : vals[ 1 ], eol );
(*writeproc)( writeparm, buf, strlen( buf ));
/*
return( dup );
}
dup.dsize = data.dsize;
- if ( dup.dptr = (char *) malloc( data.dsize ) )
+ dup.dptr = (char *) malloc( data.dsize );
+ if ( dup.dptr )
memcpy( dup.dptr, data.dptr, data.dsize );
return( dup );
*(*next)++ = '\0';
break;
}
- *(*next)++;
+ (*next)++;
}
return( l );
b64 = 0;
stop = (unsigned char *) (val + vlen);
- if ( isascii( val[0] ) && isspace( val[0] ) || val[0] == ':' ) {
+ if ( isascii( val[0] ) && (isspace( val[0] ) || val[0] == ':') ) {
b64 = 1;
} else {
for ( byte = (unsigned char *) val; byte < stop;
#include <stdlib.h>
#include <stddef.h>
+#include <ctype.h>
#include <ac/string.h>
tarindex = 0;
while ((ch = *src++) != '\0') {
- if (isspace(ch)) /* Skip whitespace anywhere. */
+ if (isascii(ch) && isspace(ch)) /* Skip whitespace anywhere. */
continue;
if (ch == Pad64)
case 2: /* Valid, means one byte of info */
/* Skip any number of spaces. */
for ((void)NULL; ch != '\0'; ch = *src++)
- if (!isspace(ch))
+ if (! (isascii(ch) && isspace(ch)))
break;
/* Make sure there is another trailing = sign. */
if (ch != Pad64)
* whitespace after it?
*/
for ((void)NULL; ch != '\0'; ch = *src++)
- if (!isspace(ch))
+ if (! (isascii(ch) && isspace(ch)))
return (-1);
/*