mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-15 03:01:09 +08:00
More lint removal from Hallvard.
This commit is contained in:
parent
238f7361d6
commit
b978170b1a
@ -29,13 +29,13 @@ typedef struct avlnode {
|
|||||||
#define NULLAVL ((Avlnode *) NULL)
|
#define NULLAVL ((Avlnode *) NULL)
|
||||||
|
|
||||||
/* balance factor values */
|
/* balance factor values */
|
||||||
#define LH -1
|
#define LH (-1)
|
||||||
#define EH 0
|
#define EH 0
|
||||||
#define RH 1
|
#define RH 1
|
||||||
|
|
||||||
/* avl routines */
|
/* avl routines */
|
||||||
#define avl_getone(x) (x == 0 ? 0 : (x)->avl_data)
|
#define avl_getone(x) ((x) == 0 ? 0 : (x)->avl_data)
|
||||||
#define avl_onenode(x) (x == 0 || ((x)->avl_left == 0 && (x)->avl_right == 0))
|
#define avl_onenode(x) ((x) == 0 || ((x)->avl_left == 0 && (x)->avl_right == 0))
|
||||||
extern int avl_insert();
|
extern int avl_insert();
|
||||||
extern caddr_t avl_delete();
|
extern caddr_t avl_delete();
|
||||||
extern caddr_t avl_find();
|
extern caddr_t avl_find();
|
||||||
@ -49,7 +49,7 @@ extern int avl_apply();
|
|||||||
#define AVL_INORDER 2
|
#define AVL_INORDER 2
|
||||||
#define AVL_POSTORDER 3
|
#define AVL_POSTORDER 3
|
||||||
/* what apply returns if it ran out of nodes */
|
/* what apply returns if it ran out of nodes */
|
||||||
#define AVL_NOMORE -6
|
#define AVL_NOMORE (-6)
|
||||||
|
|
||||||
typedef int (*IFP)();
|
typedef int (*IFP)();
|
||||||
|
|
||||||
|
@ -126,13 +126,13 @@ struct ldap_tmplitem {
|
|||||||
#define NULLTMPLITEM ((struct ldap_tmplitem *)0)
|
#define NULLTMPLITEM ((struct ldap_tmplitem *)0)
|
||||||
|
|
||||||
#define LDAP_SET_TMPLITEM_APPDATA( ti, datap ) \
|
#define LDAP_SET_TMPLITEM_APPDATA( ti, datap ) \
|
||||||
(ti)->ti_appdata = (void *)(datap)
|
( (ti)->ti_appdata = (void *)(datap) )
|
||||||
|
|
||||||
#define LDAP_GET_TMPLITEM_APPDATA( ti, type ) \
|
#define LDAP_GET_TMPLITEM_APPDATA( ti, type ) \
|
||||||
(type)((ti)->ti_appdata)
|
( (type)((ti)->ti_appdata) )
|
||||||
|
|
||||||
#define LDAP_IS_TMPLITEM_OPTION_SET( ti, option ) \
|
#define LDAP_IS_TMPLITEM_OPTION_SET( ti, option ) \
|
||||||
(((ti)->ti_options & option ) != 0 )
|
( ((ti)->ti_options & (option) ) != 0 )
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -202,13 +202,13 @@ struct ldap_disptmpl {
|
|||||||
#define NULLDISPTMPL ((struct ldap_disptmpl *)0)
|
#define NULLDISPTMPL ((struct ldap_disptmpl *)0)
|
||||||
|
|
||||||
#define LDAP_SET_DISPTMPL_APPDATA( dt, datap ) \
|
#define LDAP_SET_DISPTMPL_APPDATA( dt, datap ) \
|
||||||
(dt)->dt_appdata = (void *)(datap)
|
( (dt)->dt_appdata = (void *)(datap) )
|
||||||
|
|
||||||
#define LDAP_GET_DISPTMPL_APPDATA( dt, type ) \
|
#define LDAP_GET_DISPTMPL_APPDATA( dt, type ) \
|
||||||
(type)((dt)->dt_appdata)
|
( (type)((dt)->dt_appdata) )
|
||||||
|
|
||||||
#define LDAP_IS_DISPTMPL_OPTION_SET( dt, option ) \
|
#define LDAP_IS_DISPTMPL_OPTION_SET( dt, option ) \
|
||||||
(((dt)->dt_options & option ) != 0 )
|
( ((dt)->dt_options & (option) ) != 0 )
|
||||||
|
|
||||||
#define LDAP_TMPL_ERR_VERSION 1
|
#define LDAP_TMPL_ERR_VERSION 1
|
||||||
#define LDAP_TMPL_ERR_MEM 2
|
#define LDAP_TMPL_ERR_MEM 2
|
||||||
|
@ -168,12 +168,12 @@ extern void ber_init();
|
|||||||
* SAFEMEMCPY is an overlap-safe copy from s to d of n bytes
|
* SAFEMEMCPY is an overlap-safe copy from s to d of n bytes
|
||||||
*/
|
*/
|
||||||
#ifdef MACOS
|
#ifdef MACOS
|
||||||
#define SAFEMEMCPY( d, s, n ) BlockMoveData( (Ptr)s, (Ptr)d, n )
|
#define SAFEMEMCPY( d, s, n ) BlockMoveData( (Ptr)(s), (Ptr)(d), (n) )
|
||||||
#else /* MACOS */
|
#else /* MACOS */
|
||||||
#ifdef sunos4
|
#ifdef sunos4
|
||||||
#define SAFEMEMCPY( d, s, n ) bcopy( s, d, n )
|
#define SAFEMEMCPY( d, s, n ) bcopy( (s), (d), (n) )
|
||||||
#else /* sunos4 */
|
#else /* sunos4 */
|
||||||
#define SAFEMEMCPY( d, s, n ) memmove( d, s, n )
|
#define SAFEMEMCPY( d, s, n ) memmove( (d), (s), (n) )
|
||||||
#endif /* sunos4 */
|
#endif /* sunos4 */
|
||||||
#endif /* MACOS */
|
#endif /* MACOS */
|
||||||
|
|
||||||
|
@ -64,16 +64,16 @@ extern int ldap_syslog_level;
|
|||||||
#ifdef LDAP_SYSLOG
|
#ifdef LDAP_SYSLOG
|
||||||
#define Debug( level, fmt, arg1, arg2, arg3 ) \
|
#define Debug( level, fmt, arg1, arg2, arg3 ) \
|
||||||
{ \
|
{ \
|
||||||
if ( ldap_debug & level ) \
|
if ( ldap_debug & (level) ) \
|
||||||
fprintf( stderr, fmt, arg1, arg2, arg3 ); \
|
fprintf( stderr, (fmt), (arg1), (arg2), (arg3) ); \
|
||||||
if ( ldap_syslog & level ) \
|
if ( ldap_syslog & level ) \
|
||||||
syslog( ldap_syslog_level, fmt, arg1, arg2, arg3 ); \
|
syslog( ldap_syslog_level, (fmt), (arg1), (arg2), (arg3) ); \
|
||||||
}
|
}
|
||||||
#else /* LDAP_SYSLOG */
|
#else /* LDAP_SYSLOG */
|
||||||
#ifndef WINSOCK
|
#ifndef WINSOCK
|
||||||
#define Debug( level, fmt, arg1, arg2, arg3 ) \
|
#define Debug( level, fmt, arg1, arg2, arg3 ) \
|
||||||
if ( ldap_debug & level ) \
|
if ( ldap_debug & (level) ) \
|
||||||
fprintf( stderr, fmt, arg1, arg2, arg3 );
|
fprintf( stderr, (fmt), (arg1), (arg2), (arg3) );
|
||||||
#else /* !WINSOCK */
|
#else /* !WINSOCK */
|
||||||
extern void Debug( int level, char* fmt, ... );
|
extern void Debug( int level, char* fmt, ... );
|
||||||
#endif /* !WINSOCK */
|
#endif /* !WINSOCK */
|
||||||
@ -490,7 +490,7 @@ typedef struct friendly {
|
|||||||
/*
|
/*
|
||||||
* handy macro to check whether LDAP struct is set up for CLDAP or not
|
* handy macro to check whether LDAP struct is set up for CLDAP or not
|
||||||
*/
|
*/
|
||||||
#define LDAP_IS_CLDAP( ld ) ( ld->ld_sb.sb_naddr > 0 )
|
#define LDAP_IS_CLDAP( ld ) ( (ld)->ld_sb.sb_naddr > 0 )
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -34,7 +34,7 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
#define LDIF_SIZE_NEEDED(tlen,vlen) \
|
#define LDIF_SIZE_NEEDED(tlen,vlen) \
|
||||||
((tlen) + 4 + LDIF_BASE64_LEN(vlen) \
|
((tlen) + 4 + LDIF_BASE64_LEN(vlen) \
|
||||||
+ ((LDIF_BASE64_LEN(vlen) + tlen + 3) / LINE_WIDTH * 2 ))
|
+ ((LDIF_BASE64_LEN(vlen) + (tlen) + 3) / LINE_WIDTH * 2 ))
|
||||||
|
|
||||||
|
|
||||||
#ifdef NEEDPROTOS
|
#ifdef NEEDPROTOS
|
||||||
|
@ -164,7 +164,7 @@ typedef cond_t pthread_cond_t;
|
|||||||
#define pthread_attr_init( a ) pthread_attr_create( a )
|
#define pthread_attr_init( a ) pthread_attr_create( a )
|
||||||
#define pthread_attr_destroy( a ) pthread_attr_delete( a )
|
#define pthread_attr_destroy( a ) pthread_attr_delete( a )
|
||||||
#define pthread_attr_setdetachstate( a, b ) \
|
#define pthread_attr_setdetachstate( a, b ) \
|
||||||
pthread_attr_setdetach_np( a, b )
|
pthread_attr_setdetach_np( (a), (b) )
|
||||||
|
|
||||||
#else /* end dce pthreads */
|
#else /* end dce pthreads */
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@
|
|||||||
* compilers don't like recursive macros, so ignore the problem if __STDC__
|
* compilers don't like recursive macros, so ignore the problem if __STDC__
|
||||||
* is not defined.
|
* is not defined.
|
||||||
*/
|
*/
|
||||||
#define select(a,b,c,d,e) select(a, (int *)b, (int *)c, (int *)d, e)
|
#define select(a,b,c,d,e) select((a),(int *)(b),(int *)(c),(int *)(d),(e))
|
||||||
#endif /* hpux && __STDC__ */
|
#endif /* hpux && __STDC__ */
|
||||||
|
|
||||||
|
|
||||||
@ -171,11 +171,11 @@
|
|||||||
* toupper and tolower macros are different under bsd and sys v
|
* toupper and tolower macros are different under bsd and sys v
|
||||||
*/
|
*/
|
||||||
#if defined( SYSV ) && !defined( hpux )
|
#if defined( SYSV ) && !defined( hpux )
|
||||||
#define TOUPPER(c) (isascii(c) && islower(c) ? _toupper(c) : c)
|
#define TOUPPER(c) (isascii(c) && islower(c) ? _toupper(c) : (c))
|
||||||
#define TOLOWER(c) (isascii(c) && isupper(c) ? _tolower(c) : c)
|
#define TOLOWER(c) (isascii(c) && isupper(c) ? _tolower(c) : (c))
|
||||||
#else
|
#else
|
||||||
#define TOUPPER(c) (isascii(c) && islower(c) ? toupper(c) : c)
|
#define TOUPPER(c) (isascii(c) && islower(c) ? toupper(c) : (c))
|
||||||
#define TOLOWER(c) (isascii(c) && isupper(c) ? tolower(c) : c)
|
#define TOLOWER(c) (isascii(c) && isupper(c) ? tolower(c) : (c))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -186,16 +186,16 @@
|
|||||||
#define TERMFLAG_TYPE int
|
#define TERMFLAG_TYPE int
|
||||||
#define GETATTR( fd, tiop ) ioctl((fd), TIOCGETP, (caddr_t)(tiop))
|
#define GETATTR( fd, tiop ) ioctl((fd), TIOCGETP, (caddr_t)(tiop))
|
||||||
#define SETATTR( fd, tiop ) ioctl((fd), TIOCSETP, (caddr_t)(tiop))
|
#define SETATTR( fd, tiop ) ioctl((fd), TIOCSETP, (caddr_t)(tiop))
|
||||||
#define GETFLAGS( tio ) (tio).sg_flags
|
#define GETFLAGS( tio ) ((tio).sg_flags)
|
||||||
#define SETFLAGS( tio, flags ) (tio).sg_flags = (flags)
|
#define SETFLAGS( tio, flags ) ((tio).sg_flags = (flags))
|
||||||
#else
|
#else
|
||||||
#define USE_TERMIOS
|
#define USE_TERMIOS
|
||||||
#define TERMIO_TYPE struct termios
|
#define TERMIO_TYPE struct termios
|
||||||
#define TERMFLAG_TYPE tcflag_t
|
#define TERMFLAG_TYPE tcflag_t
|
||||||
#define GETATTR( fd, tiop ) tcgetattr((fd), (tiop))
|
#define GETATTR( fd, tiop ) tcgetattr((fd), (tiop))
|
||||||
#define SETATTR( fd, tiop ) tcsetattr((fd), TCSANOW /* 0 */, (tiop))
|
#define SETATTR( fd, tiop ) tcsetattr((fd), TCSANOW /* 0 */, (tiop))
|
||||||
#define GETFLAGS( tio ) (tio).c_lflag
|
#define GETFLAGS( tio ) ((tio).c_lflag)
|
||||||
#define SETFLAGS( tio, flags ) (tio).c_lflag = (flags)
|
#define SETFLAGS( tio, flags ) ((tio).c_lflag = (flags))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ struct ldap_searchobj {
|
|||||||
#define LDAP_SEARCHOBJ_OPT_INTERNAL 0x00000001
|
#define LDAP_SEARCHOBJ_OPT_INTERNAL 0x00000001
|
||||||
|
|
||||||
#define LDAP_IS_SEARCHOBJ_OPTION_SET( so, option ) \
|
#define LDAP_IS_SEARCHOBJ_OPTION_SET( so, option ) \
|
||||||
(((so)->so_options & option ) != 0 )
|
(((so)->so_options & (option) ) != 0 )
|
||||||
|
|
||||||
#define LDAP_SEARCHPREF_VERSION_ZERO 0
|
#define LDAP_SEARCHPREF_VERSION_ZERO 0
|
||||||
#define LDAP_SEARCHPREF_VERSION 1
|
#define LDAP_SEARCHPREF_VERSION 1
|
||||||
|
Loading…
Reference in New Issue
Block a user