More lint removal from Hallvard.

This commit is contained in:
Kurt Zeilenga 1998-10-23 23:10:49 +00:00
parent 238f7361d6
commit b978170b1a
8 changed files with 31 additions and 31 deletions

View File

@ -29,13 +29,13 @@ typedef struct avlnode {
#define NULLAVL ((Avlnode *) NULL)
/* balance factor values */
#define LH -1
#define LH (-1)
#define EH 0
#define RH 1
/* avl routines */
#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_getone(x) ((x) == 0 ? 0 : (x)->avl_data)
#define avl_onenode(x) ((x) == 0 || ((x)->avl_left == 0 && (x)->avl_right == 0))
extern int avl_insert();
extern caddr_t avl_delete();
extern caddr_t avl_find();
@ -49,7 +49,7 @@ extern int avl_apply();
#define AVL_INORDER 2
#define AVL_POSTORDER 3
/* what apply returns if it ran out of nodes */
#define AVL_NOMORE -6
#define AVL_NOMORE (-6)
typedef int (*IFP)();

View File

@ -126,13 +126,13 @@ struct ldap_tmplitem {
#define NULLTMPLITEM ((struct ldap_tmplitem *)0)
#define LDAP_SET_TMPLITEM_APPDATA( ti, datap ) \
(ti)->ti_appdata = (void *)(datap)
( (ti)->ti_appdata = (void *)(datap) )
#define LDAP_GET_TMPLITEM_APPDATA( ti, type ) \
(type)((ti)->ti_appdata)
( (type)((ti)->ti_appdata) )
#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 LDAP_SET_DISPTMPL_APPDATA( dt, datap ) \
(dt)->dt_appdata = (void *)(datap)
( (dt)->dt_appdata = (void *)(datap) )
#define LDAP_GET_DISPTMPL_APPDATA( dt, type ) \
(type)((dt)->dt_appdata)
( (type)((dt)->dt_appdata) )
#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_MEM 2

View File

@ -168,12 +168,12 @@ extern void ber_init();
* SAFEMEMCPY is an overlap-safe copy from s to d of n bytes
*/
#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 */
#ifdef sunos4
#define SAFEMEMCPY( d, s, n ) bcopy( s, d, n )
#define SAFEMEMCPY( d, s, n ) bcopy( (s), (d), (n) )
#else /* sunos4 */
#define SAFEMEMCPY( d, s, n ) memmove( d, s, n )
#define SAFEMEMCPY( d, s, n ) memmove( (d), (s), (n) )
#endif /* sunos4 */
#endif /* MACOS */

View File

@ -64,16 +64,16 @@ extern int ldap_syslog_level;
#ifdef LDAP_SYSLOG
#define Debug( level, fmt, arg1, arg2, arg3 ) \
{ \
if ( ldap_debug & level ) \
fprintf( stderr, fmt, arg1, arg2, arg3 ); \
if ( ldap_debug & (level) ) \
fprintf( stderr, (fmt), (arg1), (arg2), (arg3) ); \
if ( ldap_syslog & level ) \
syslog( ldap_syslog_level, fmt, arg1, arg2, arg3 ); \
syslog( ldap_syslog_level, (fmt), (arg1), (arg2), (arg3) ); \
}
#else /* LDAP_SYSLOG */
#ifndef WINSOCK
#define Debug( level, fmt, arg1, arg2, arg3 ) \
if ( ldap_debug & level ) \
fprintf( stderr, fmt, arg1, arg2, arg3 );
if ( ldap_debug & (level) ) \
fprintf( stderr, (fmt), (arg1), (arg2), (arg3) );
#else /* !WINSOCK */
extern void Debug( int level, char* fmt, ... );
#endif /* !WINSOCK */
@ -490,7 +490,7 @@ typedef struct friendly {
/*
* 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 )
/*

View File

@ -34,7 +34,7 @@ extern "C" {
*/
#define LDIF_SIZE_NEEDED(tlen,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

View File

@ -164,7 +164,7 @@ typedef cond_t pthread_cond_t;
#define pthread_attr_init( a ) pthread_attr_create( a )
#define pthread_attr_destroy( a ) pthread_attr_delete( a )
#define pthread_attr_setdetachstate( a, b ) \
pthread_attr_setdetach_np( a, b )
pthread_attr_setdetach_np( (a), (b) )
#else /* end dce pthreads */

View File

@ -134,7 +134,7 @@
* compilers don't like recursive macros, so ignore the problem if __STDC__
* 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__ */
@ -171,11 +171,11 @@
* toupper and tolower macros are different under bsd and sys v
*/
#if defined( SYSV ) && !defined( hpux )
#define TOUPPER(c) (isascii(c) && islower(c) ? _toupper(c) : c)
#define TOLOWER(c) (isascii(c) && isupper(c) ? _tolower(c) : c)
#define TOUPPER(c) (isascii(c) && islower(c) ? _toupper(c) : (c))
#define TOLOWER(c) (isascii(c) && isupper(c) ? _tolower(c) : (c))
#else
#define TOUPPER(c) (isascii(c) && islower(c) ? toupper(c) : c)
#define TOLOWER(c) (isascii(c) && isupper(c) ? tolower(c) : c)
#define TOUPPER(c) (isascii(c) && islower(c) ? toupper(c) : (c))
#define TOLOWER(c) (isascii(c) && isupper(c) ? tolower(c) : (c))
#endif
/*
@ -186,16 +186,16 @@
#define TERMFLAG_TYPE int
#define GETATTR( fd, tiop ) ioctl((fd), TIOCGETP, (caddr_t)(tiop))
#define SETATTR( fd, tiop ) ioctl((fd), TIOCSETP, (caddr_t)(tiop))
#define GETFLAGS( tio ) (tio).sg_flags
#define SETFLAGS( tio, flags ) (tio).sg_flags = (flags)
#define GETFLAGS( tio ) ((tio).sg_flags)
#define SETFLAGS( tio, flags ) ((tio).sg_flags = (flags))
#else
#define USE_TERMIOS
#define TERMIO_TYPE struct termios
#define TERMFLAG_TYPE tcflag_t
#define GETATTR( fd, tiop ) tcgetattr((fd), (tiop))
#define SETATTR( fd, tiop ) tcsetattr((fd), TCSANOW /* 0 */, (tiop))
#define GETFLAGS( tio ) (tio).c_lflag
#define SETFLAGS( tio, flags ) (tio).c_lflag = (flags)
#define GETFLAGS( tio ) ((tio).c_lflag)
#define SETFLAGS( tio, flags ) ((tio).c_lflag = (flags))
#endif

View File

@ -60,7 +60,7 @@ struct ldap_searchobj {
#define LDAP_SEARCHOBJ_OPT_INTERNAL 0x00000001
#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 1