From fb483acf626088ebce6f148c1e9644ce9c8c2045 Mon Sep 17 00:00:00 2001 From: "Chas Williams (CONTRACTOR)" Date: Mon, 11 Feb 2013 17:05:34 -0500 Subject: [PATCH] afs: removing trailing semicolons Remove spurious trailing semicolons from macros. Change-Id: I26550a4ca8e8fe5232dad4cdb2c42a5f44a28f32 Reviewed-on: http://gerrit.openafs.org/9092 Reviewed-by: Jeffrey Altman Tested-by: BuildBot --- src/WINNT/afsd/cm_btree.h | 2 +- src/WINNT/afsd/smb.h | 24 +++++++++---------- src/WINNT/afsd/test/convtest.c | 2 +- .../afsrdr/kernel/lib/Include/AFSDefines.h | 2 +- src/WINNT/kfw/inc/krb4/conf-pc.h | 2 +- src/WINNT/tests/nmtest/nmtest.c | 2 +- src/afs/AIX/osi_sleep.c | 2 +- src/afs/DARWIN/osi_machdep.h | 10 ++++---- src/afs/DARWIN/osi_sleep.c | 2 +- src/afs/FBSD/osi_sleep.c | 2 +- src/afs/FBSD/osi_vm.c | 4 ++-- src/afs/IRIX/osi_sleep.c | 4 ++-- src/afs/LINUX/osi_sleep.c | 4 ++-- src/afs/LINUX24/osi_sleep.c | 4 ++-- src/afs/NBSD/osi_sleep.c | 2 +- src/afs/OBSD/osi_sleep.c | 2 +- src/afs/SOLARIS/osi_machdep.h | 4 ++-- src/afs/SOLARIS/osi_sleep.c | 2 +- src/afs/afs.h | 6 ++--- src/config/stds.h | 8 +++---- src/gtx/gtxobjects.h | 6 ++--- src/kauth/crypt.c | 6 ++--- src/kauth/test/test_getticket.c | 6 ++--- src/lwp/lock.h | 4 ++-- src/mcas/gc.c | 2 +- src/mcas/skip_cas_func.c | 2 +- src/platform/DARWIN/AFSPreference/global.h | 2 +- src/rx/NBSD/rx_kmutex.h | 2 +- src/util/serverLog.c | 4 ++-- src/viced/host.h | 4 ++-- src/viced/viced.h | 8 +++---- 31 files changed, 68 insertions(+), 68 deletions(-) diff --git a/src/WINNT/afsd/cm_btree.h b/src/WINNT/afsd/cm_btree.h index 8a7f73363d..9a61da6c27 100644 --- a/src/WINNT/afsd/cm_btree.h +++ b/src/WINNT/afsd/cm_btree.h @@ -206,7 +206,7 @@ extern afs_uint64 bplus_free_time; /* access tree flag values */ #define settreeflags(B,v) (B->flags |= (v & TREE_FLAGS_MASK)) #define gettreeflags(B) (B->flags) -#define cleartreeflags(B) (B->flags = 0); +#define cleartreeflags(B) (B->flags = 0) /* access node flag values */ #define setflag(j, v) ((j)->flags |= (v & FLAGS_MASK)) diff --git a/src/WINNT/afsd/smb.h b/src/WINNT/afsd/smb.h index 7cfb20ad65..e8d4060b9b 100644 --- a/src/WINNT/afsd/smb.h +++ b/src/WINNT/afsd/smb.h @@ -561,19 +561,19 @@ extern void CompensateForSmbClientLastWriteTimeBugs(afs_uint32 *dosTimep); #ifdef DEBUG_SMB_REFCOUNT extern smb_vc_t *smb_FindVCDbg(unsigned short lsn, int flags, int lana, char *, long); -#define smb_FindVC(a,b,c) smb_FindVCDbg(a,b,c,__FILE__,__LINE__); +#define smb_FindVC(a,b,c) smb_FindVCDbg(a,b,c,__FILE__,__LINE__) extern void smb_HoldVCDbg(smb_vc_t *vcp, char *, long); -#define smb_HoldVC(a) smb_HoldVCDbg(a,__FILE__,__LINE__); +#define smb_HoldVC(a) smb_HoldVCDbg(a,__FILE__,__LINE__) extern void smb_HoldVCNoLockDbg(smb_vc_t *vcp, char *, long); -#define smb_HoldVCNoLock(a) smb_HoldVCNoLockDbg(a,__FILE__,__LINE__); +#define smb_HoldVCNoLock(a) smb_HoldVCNoLockDbg(a,__FILE__,__LINE__) extern void smb_ReleaseVCDbg(smb_vc_t *vcp, char *, long); -#define smb_ReleaseVC(a) smb_ReleaseVCDbg(a,__FILE__,__LINE__); +#define smb_ReleaseVC(a) smb_ReleaseVCDbg(a,__FILE__,__LINE__) extern void smb_ReleaseVCNoLockDbg(smb_vc_t *vcp, char *, long); -#define smb_ReleaseVCNoLock(a) smb_ReleaseVCNoLockDbg(a,__FILE__,__LINE__); +#define smb_ReleaseVCNoLock(a) smb_ReleaseVCNoLockDbg(a,__FILE__,__LINE__) #else extern smb_vc_t *smb_FindVC(unsigned short lsn, int flags, int lana); @@ -592,13 +592,13 @@ extern void smb_MarkAllVCsDead(smb_vc_t *exclude_vcp); #ifdef DEBUG_SMB_REFCOUNT extern smb_tid_t *smb_FindTIDDbg(smb_vc_t *vcp, unsigned short tid, int flags, char *, long); -#define smb_FindTID(a,b,c) smb_FindTIDDbg(a,b,c,__FILE__,__LINE__); +#define smb_FindTID(a,b,c) smb_FindTIDDbg(a,b,c,__FILE__,__LINE__) extern void smb_HoldTIDNoLockDbg(smb_tid_t *tidp, char *, long); -#define smb_HoldTIDNoLock(a) smb_HoldTIDNoLockDbg(a,__FILE__,__LINE__); +#define smb_HoldTIDNoLock(a) smb_HoldTIDNoLockDbg(a,__FILE__,__LINE__) extern void smb_ReleaseTIDDbg(smb_tid_t *tidp, afs_uint32 locked, char *, long); -#define smb_ReleaseTID(a,b) smb_ReleaseTIDDbg(a,b,__FILE__,__LINE__); +#define smb_ReleaseTID(a,b) smb_ReleaseTIDDbg(a,b,__FILE__,__LINE__) #else extern smb_tid_t *smb_FindTID(smb_vc_t *vcp, unsigned short tid, int flags); @@ -633,16 +633,16 @@ extern long smb_LookupTIDPath(smb_vc_t *vcp, unsigned short tid, clientchar_t ** #ifdef DEBUG_SMB_REFCOUNT extern smb_fid_t *smb_FindFIDDbg(smb_vc_t *vcp, unsigned short fid, int flags, char *, long); -#define smb_FindFID(a,b,c) smb_FindFIDDbg(a,b,c,__FILE__,__LINE__); +#define smb_FindFID(a,b,c) smb_FindFIDDbg(a,b,c,__FILE__,__LINE__) extern smb_fid_t *smb_FindFIDByScacheDbg(smb_vc_t *vcp, cm_scache_t * scp, char *, long); -#define smb_FindFIDByScache(a,b) smb_FindFIDByScacheDbg(a,b,__FILE__,__LINE__); +#define smb_FindFIDByScache(a,b) smb_FindFIDByScacheDbg(a,b,__FILE__,__LINE__) extern void smb_HoldFIDNoLockDbg(smb_fid_t *fidp, char *, long); -#define smb_HoldFIDNoLock(a) smb_HoldFIDNoLockDbg(a,__FILE__,__LINE__); +#define smb_HoldFIDNoLock(a) smb_HoldFIDNoLockDbg(a,__FILE__,__LINE__) extern void smb_ReleaseFIDDbg(smb_fid_t *fidp, char *, long); -#define smb_ReleaseFID(a) smb_ReleaseFIDDbg(a,__FILE__,__LINE__); +#define smb_ReleaseFID(a) smb_ReleaseFIDDbg(a,__FILE__,__LINE__) #else extern smb_fid_t *smb_FindFID(smb_vc_t *vcp, unsigned short fid, int flags); diff --git a/src/WINNT/afsd/test/convtest.c b/src/WINNT/afsd/test/convtest.c index f30f06182d..3c0c6bbfc4 100644 --- a/src/WINNT/afsd/test/convtest.c +++ b/src/WINNT/afsd/test/convtest.c @@ -327,7 +327,7 @@ int main(int argc, char ** argv) cm_InitNormalization(); -#define RUNTEST(f) printf("Begin " #f "\n"); trv = f(); printf ("End " #f "\n\n"); if (trv != 0) return trv; +#define RUNTEST(f) printf("Begin " #f "\n"); trv = f(); printf ("End " #f "\n\n"); if (trv != 0) return trv RUNTEST(cm_NormalizeStringAllocTest); RUNTEST(cm_NormalizeStringTest); diff --git a/src/WINNT/afsrdr/kernel/lib/Include/AFSDefines.h b/src/WINNT/afsrdr/kernel/lib/Include/AFSDefines.h index b0b0a305eb..b437260e67 100644 --- a/src/WINNT/afsrdr/kernel/lib/Include/AFSDefines.h +++ b/src/WINNT/afsrdr/kernel/lib/Include/AFSDefines.h @@ -227,7 +227,7 @@ NTSTATUS ((((ULONG)(Ptr)) + 7) & 0xfffffff8) \ ) -#define CRC32_POLYNOMIAL 0xEDB88320L; +#define CRC32_POLYNOMIAL 0xEDB88320L #define AFS_SERVER_FLUSH_DELAY (5LL * AFS_ONE_SECOND) #define AFS_SERVER_PURGE_DELAY (300LL * AFS_ONE_SECOND) diff --git a/src/WINNT/kfw/inc/krb4/conf-pc.h b/src/WINNT/kfw/inc/krb4/conf-pc.h index 26d1bfbaa3..a529730342 100644 --- a/src/WINNT/kfw/inc/krb4/conf-pc.h +++ b/src/WINNT/kfw/inc/krb4/conf-pc.h @@ -102,7 +102,7 @@ typedef unsigned int WORD; #define RANDOM_KRB_INT32_1 ((KRB_INT32) time(NULL)) #define RANDOM_KRB_INT32_2 ((KRB_INT32) getpid()) -#define TIME_GMT_UNIXSEC unix_time_gmt_unixsec((unsigned KRB_INT32 *)0); +#define TIME_GMT_UNIXSEC unix_time_gmt_unixsec((unsigned KRB_INT32 *)0) #ifndef MAXPATHLEN #define MAXPATHLEN _MAX_PATH #endif diff --git a/src/WINNT/tests/nmtest/nmtest.c b/src/WINNT/tests/nmtest/nmtest.c index 827527eb12..d7f6f4c2db 100644 --- a/src/WINNT/tests/nmtest/nmtest.c +++ b/src/WINNT/tests/nmtest/nmtest.c @@ -54,7 +54,7 @@ void dump_hex(BYTE * buffer, int cb) fprintf(stderr, "\n"); } -#define CCall(f) if (!f) goto done; +#define CCall(f) if (!f) goto done BOOL init_test_data(void) { diff --git a/src/afs/AIX/osi_sleep.c b/src/afs/AIX/osi_sleep.c index 507ba6d41b..ba95579129 100644 --- a/src/afs/AIX/osi_sleep.c +++ b/src/afs/AIX/osi_sleep.c @@ -83,7 +83,7 @@ afs_osi_Wait(afs_int32 ams, struct afs_osi_WaitHandle *ahandle, int aintok) afs_event_t *afs_evhasht[AFS_EVHASHSIZE]; /* Hash table for events */ -#define afs_evhash(event) (afs_uint32) ((((long)event)>>2) & (AFS_EVHASHSIZE-1)); +#define afs_evhash(event) (afs_uint32) ((((long)event)>>2) & (AFS_EVHASHSIZE-1)) int afs_evhashcnt = 0; /* Get and initialize event structure corresponding to lwp event (i.e. address) diff --git a/src/afs/DARWIN/osi_machdep.h b/src/afs/DARWIN/osi_machdep.h index eff69b1fcf..ae00c4903c 100644 --- a/src/afs/DARWIN/osi_machdep.h +++ b/src/afs/DARWIN/osi_machdep.h @@ -69,7 +69,7 @@ enum vcexcl { EXCL, NONEXCL }; #ifndef AFS_DARWIN80_ENV #define vnode_clearfsnode(x) ((x)->v_data = 0) #define vnode_fsnode(x) (x)->v_data -#define vnode_lock(x) vn_lock(x, LK_EXCLUSIVE | LK_RETRY, current_proc()); +#define vnode_lock(x) vn_lock(x, LK_EXCLUSIVE | LK_RETRY, current_proc()) #define vnode_isvroot(x) (((x)->v_flag & VROOT)?1:0) #define vnode_vtype(x) (x)->v_type #define vnode_isdir(x) ((x)->v_type == VDIR) @@ -143,7 +143,7 @@ typedef struct proc afs_proc_t; #define osi_vnhold(avc,r) VN_HOLD(AFSTOV(avc)) #define VN_HOLD(vp) darwin_vn_hold(vp) -#define VN_RELE(vp) vrele(vp); +#define VN_RELE(vp) vrele(vp) void darwin_vn_hold(struct vnode *vp); @@ -205,11 +205,11 @@ extern struct lock__bsd__ afs_global_lock; #define USERPRI #if 0 #undef SPLVAR -#define SPLVAR int x; +#define SPLVAR int x #undef NETPRI -#define NETPRI x=splnet(); +#define NETPRI x=splnet() #undef USERPRI -#define USERPRI splx(x); +#define USERPRI splx(x) #endif #define AFS_APPL_UFS_CACHE 1 diff --git a/src/afs/DARWIN/osi_sleep.c b/src/afs/DARWIN/osi_sleep.c index 789091dea9..0e87d05b6d 100644 --- a/src/afs/DARWIN/osi_sleep.c +++ b/src/afs/DARWIN/osi_sleep.c @@ -98,7 +98,7 @@ afs_osi_Wait(afs_int32 ams, struct afs_osi_WaitHandle *ahandle, int aintok) #define EVTLOCK_DESTROY(e) #endif afs_event_t *afs_evhasht[AFS_EVHASHSIZE]; /* Hash table for events */ -#define afs_evhash(event) (afs_uint32) ((((long)event)>>2) & (AFS_EVHASHSIZE-1)); +#define afs_evhash(event) (afs_uint32) ((((long)event)>>2) & (AFS_EVHASHSIZE-1)) int afs_evhashcnt = 0; /* Get and initialize event structure corresponding to lwp event (i.e. address) diff --git a/src/afs/FBSD/osi_sleep.c b/src/afs/FBSD/osi_sleep.c index a1edf0a8b1..a8de041b01 100644 --- a/src/afs/FBSD/osi_sleep.c +++ b/src/afs/FBSD/osi_sleep.c @@ -76,7 +76,7 @@ afs_osi_Wait(afs_int32 ams, struct afs_osi_WaitHandle *ahandle, int aintok) } afs_event_t *afs_evhasht[AFS_EVHASHSIZE]; /* Hash table for events */ -#define afs_evhash(event) (afs_uint32) ((((long)event)>>2) & (AFS_EVHASHSIZE-1)); +#define afs_evhash(event) (afs_uint32) ((((long)event)>>2) & (AFS_EVHASHSIZE-1)) int afs_evhashcnt = 0; /* Get and initialize event structure corresponding to lwp event (i.e. address) diff --git a/src/afs/FBSD/osi_vm.c b/src/afs/FBSD/osi_vm.c index c2f7ce1801..df7117ad52 100644 --- a/src/afs/FBSD/osi_vm.c +++ b/src/afs/FBSD/osi_vm.c @@ -47,12 +47,12 @@ #if defined(AFS_FBSD80_ENV) #define lock_vnode(v, f) vn_lock((v), (f)) -#define ilock_vnode(v) vn_lock((v), LK_INTERLOCK|LK_EXCLUSIVE|LK_RETRY); +#define ilock_vnode(v) vn_lock((v), LK_INTERLOCK|LK_EXCLUSIVE|LK_RETRY) #define unlock_vnode(v) VOP_UNLOCK((v), 0) #define islocked_vnode(v) VOP_ISLOCKED((v)) #else #define lock_vnode(v, f) vn_lock((v), (f), curthread) -#define ilock_vnode(v) vn_lock((v), LK_INTERLOCK|LK_EXCLUSIVE|LK_RETRY, curthread); +#define ilock_vnode(v) vn_lock((v), LK_INTERLOCK|LK_EXCLUSIVE|LK_RETRY, curthread) #define unlock_vnode(v) VOP_UNLOCK((v), 0, curthread) #define islocked_vnode(v) VOP_ISLOCKED((v), curthread) #endif diff --git a/src/afs/IRIX/osi_sleep.c b/src/afs/IRIX/osi_sleep.c index e47b07f52e..74bda43b5a 100644 --- a/src/afs/IRIX/osi_sleep.c +++ b/src/afs/IRIX/osi_sleep.c @@ -73,9 +73,9 @@ afs_osi_Wait(afs_int32 ams, struct afs_osi_WaitHandle *ahandle, int aintok) afs_event_t *afs_evhasht[AFS_EVHASHSIZE]; /* Hash table for events */ #if (_MIPS_SZPTR == 64) -#define afs_evhash(event) (afs_uint32) ((((long)event)>>3) & (AFS_EVHASHSIZE-1)); +#define afs_evhash(event) (afs_uint32) ((((long)event)>>3) & (AFS_EVHASHSIZE-1)) #else -#define afs_evhash(event) (afs_uint32) ((((long)event)>>2) & (AFS_EVHASHSIZE-1)); +#define afs_evhash(event) (afs_uint32) ((((long)event)>>2) & (AFS_EVHASHSIZE-1)) #endif int afs_evhashcnt = 0; diff --git a/src/afs/LINUX/osi_sleep.c b/src/afs/LINUX/osi_sleep.c index 54885e6441..07bb7fed14 100644 --- a/src/afs/LINUX/osi_sleep.c +++ b/src/afs/LINUX/osi_sleep.c @@ -68,7 +68,7 @@ afs_osi_Wait(afs_int32 ams, struct afs_osi_WaitHandle *ahandle, int aintok) } afs_event_t *afs_evhasht[AFS_EVHASHSIZE]; /* Hash table for events */ -#define afs_evhash(event) (afs_uint32) ((((long)event)>>2) & (AFS_EVHASHSIZE-1)); +#define afs_evhash(event) (afs_uint32) ((((long)event)>>2) & (AFS_EVHASHSIZE-1)) int afs_evhashcnt = 0; /* Get and initialize event structure corresponding to lwp event (i.e. address) @@ -125,7 +125,7 @@ afs_addevent(char *event) } #ifndef set_current_state -#define set_current_state(x) current->state = (x); +#define set_current_state(x) current->state = (x) #endif /* Release the specified event */ diff --git a/src/afs/LINUX24/osi_sleep.c b/src/afs/LINUX24/osi_sleep.c index 2d43a03f65..468b98d193 100644 --- a/src/afs/LINUX24/osi_sleep.c +++ b/src/afs/LINUX24/osi_sleep.c @@ -74,7 +74,7 @@ afs_osi_Wait(afs_int32 ams, struct afs_osi_WaitHandle *ahandle, int aintok) afs_event_t *afs_evhasht[AFS_EVHASHSIZE]; /* Hash table for events */ -#define afs_evhash(event) (afs_uint32) ((((long)event)>>2) & (AFS_EVHASHSIZE-1)); +#define afs_evhash(event) (afs_uint32) ((((long)event)>>2) & (AFS_EVHASHSIZE-1)) int afs_evhashcnt = 0; /* Get and initialize event structure corresponding to lwp event (i.e. address) @@ -140,7 +140,7 @@ afs_addevent(char *event) } #ifndef set_current_state -#define set_current_state(x) current->state = (x); +#define set_current_state(x) current->state = (x) #endif /* Release the specified event */ diff --git a/src/afs/NBSD/osi_sleep.c b/src/afs/NBSD/osi_sleep.c index dfa07198df..191a7e016f 100644 --- a/src/afs/NBSD/osi_sleep.c +++ b/src/afs/NBSD/osi_sleep.c @@ -194,7 +194,7 @@ afs_osi_Wait(afs_int32 ams, struct afs_osi_WaitHandle *ahandle, int aintok) afs_event_t *afs_evhasht[AFS_EVHASHSIZE]; /* Hash table for events */ -#define afs_evhash(event) (afs_uint32) ((((long)event)>>2) & (AFS_EVHASHSIZE-1)); +#define afs_evhash(event) (afs_uint32) ((((long)event)>>2) & (AFS_EVHASHSIZE-1)) int afs_evhashcnt = 0; /* Get and initialize event structure corresponding to lwp event (i.e. address) diff --git a/src/afs/OBSD/osi_sleep.c b/src/afs/OBSD/osi_sleep.c index cbfdddc1d6..3a4c8e72ba 100644 --- a/src/afs/OBSD/osi_sleep.c +++ b/src/afs/OBSD/osi_sleep.c @@ -126,7 +126,7 @@ afs_osi_Wait(afs_int32 ams, struct afs_osi_WaitHandle *ahandle, int aintok) } afs_event_t *afs_evhasht[AFS_EVHASHSIZE]; /* Hash table for events */ -#define afs_evhash(event) (afs_uint32) ((((long)event)>>2) & (AFS_EVHASHSIZE-1)); +#define afs_evhash(event) (afs_uint32) ((((long)event)>>2) & (AFS_EVHASHSIZE-1)) int afs_evhashcnt = 0; /* Get and initialize event structure corresponding to lwp event (i.e. address) diff --git a/src/afs/SOLARIS/osi_machdep.h b/src/afs/SOLARIS/osi_machdep.h index 9bc93717d6..3f13bde2bc 100644 --- a/src/afs/SOLARIS/osi_machdep.h +++ b/src/afs/SOLARIS/osi_machdep.h @@ -87,8 +87,8 @@ local_osi_Time() #include extern kmutex_t afs_global_lock; -#define AFS_GLOCK() mutex_enter(&afs_global_lock); -#define AFS_GUNLOCK() mutex_exit(&afs_global_lock); +#define AFS_GLOCK() mutex_enter(&afs_global_lock) +#define AFS_GUNLOCK() mutex_exit(&afs_global_lock) #define ISAFS_GLOCK() mutex_owned(&afs_global_lock) #define osi_InitGlock() \ mutex_init(&afs_global_lock, "afs_global_lock", MUTEX_DEFAULT, NULL); diff --git a/src/afs/SOLARIS/osi_sleep.c b/src/afs/SOLARIS/osi_sleep.c index 79a9e46ea8..7cc080a1c9 100644 --- a/src/afs/SOLARIS/osi_sleep.c +++ b/src/afs/SOLARIS/osi_sleep.c @@ -72,7 +72,7 @@ afs_osi_Wait(afs_int32 ams, struct afs_osi_WaitHandle *ahandle, int aintok) afs_event_t *afs_evhasht[AFS_EVHASHSIZE]; /* Hash table for events */ -#define afs_evhash(event) (afs_uint32) ((((long)event)>>2) & (AFS_EVHASHSIZE-1)); +#define afs_evhash(event) (afs_uint32) ((((long)event)>>2) & (AFS_EVHASHSIZE-1)) int afs_evhashcnt = 0; /* Get and initialize event structure corresponding to lwp event (i.e. address) diff --git a/src/afs/afs.h b/src/afs/afs.h index f3acdb79ce..fe433b5ee1 100644 --- a/src/afs/afs.h +++ b/src/afs/afs.h @@ -725,9 +725,9 @@ struct SimpleLocks { #else #define VREFCOUNT(v) ((v)->vrefCount) #define VREFCOUNT_GT(v,y) ((v)->vrefCount > (y)) -#define VREFCOUNT_SET(v, c) (v)->vrefCount = c; -#define VREFCOUNT_DEC(v) (v)->vrefCount--; -#define VREFCOUNT_INC(v) (v)->vrefCount++; +#define VREFCOUNT_SET(v, c) (v)->vrefCount = c +#define VREFCOUNT_DEC(v) (v)->vrefCount-- +#define VREFCOUNT_INC(v) (v)->vrefCount++ #define d_unhash(d) list_empty(&(d)->d_hash) #define dget_locked(d) dget(d) #endif diff --git a/src/config/stds.h b/src/config/stds.h index 6eecadd665..f4a98127a6 100644 --- a/src/config/stds.h +++ b/src/config/stds.h @@ -88,10 +88,10 @@ typedef unsigned long long afs_uint64; #ifndef HAVE_INT64TOINT32 #define Int64ToInt32(a) (a) & MAX_AFS_UINT32 #endif -#define FillInt64(t,h,l) (t) = ((afs_int64)(h) << 32) | (l); -#define SplitInt64(t,h,l) (h) = ((afs_int64)t) >> 32; (l) = (t) & MAX_AFS_UINT32; -#define RoundInt64ToInt32(a) (a > MAX_AFS_UINT32) ? MAX_AFS_UINT32 : a; -#define RoundInt64ToInt31(a) (a > MAX_AFS_INT32) ? MAX_AFS_INT32 : a; +#define FillInt64(t,h,l) (t) = ((afs_int64)(h) << 32) | (l) +#define SplitInt64(t,h,l) (h) = ((afs_int64)t) >> 32; (l) = (t) & MAX_AFS_UINT32 +#define RoundInt64ToInt32(a) (a > MAX_AFS_UINT32) ? MAX_AFS_UINT32 : a +#define RoundInt64ToInt31(a) (a > MAX_AFS_INT32) ? MAX_AFS_INT32 : a #ifdef AFS_64BIT_CLIENT typedef afs_int64 afs_size_t; diff --git a/src/gtx/gtxobjects.h b/src/gtx/gtxobjects.h index 564e208f98..50be545039 100644 --- a/src/gtx/gtxobjects.h +++ b/src/gtx/gtxobjects.h @@ -58,9 +58,9 @@ struct onodeops { /* * Macros facilitating the use of onode functions. */ -#define OOP_DESTROY(ONP) (ONP)->o_op->on_destroy(ONP); -#define OOP_DISPLAY(ONP) (ONP)->o_op->on_display(ONP); -#define OOP_RELEASE(ONP) (ONP)->o_op->on_release(ONP); +#define OOP_DESTROY(ONP) (ONP)->o_op->on_destroy(ONP) +#define OOP_DISPLAY(ONP) (ONP)->o_op->on_display(ONP) +#define OOP_RELEASE(ONP) (ONP)->o_op->on_release(ONP) /* * Initialization parameters for an onode. diff --git a/src/kauth/crypt.c b/src/kauth/crypt.c index e44be122bd..45ea6189fc 100644 --- a/src/kauth/crypt.c +++ b/src/kauth/crypt.c @@ -681,14 +681,14 @@ des_cipher(const char *in, char *out, long salt, int num_iter) #define SPTAB(t, i) (*(long *)((unsigned char *)t + i*(sizeof(long)/4))) #if defined(gould) /* use this if B.b[i] is evaluated just once ... */ -#define DOXOR(x,y,i) x^=SPTAB(SPE[0][i],B.b[i]); y^=SPTAB(SPE[1][i],B.b[i]); +#define DOXOR(x,y,i) x^=SPTAB(SPE[0][i],B.b[i]); y^=SPTAB(SPE[1][i],B.b[i]) #else #if defined(pdp11) /* use this if your "long" int indexing is slow */ -#define DOXOR(x,y,i) j=B.b[i]; x^=SPTAB(SPE[0][i],j); y^=SPTAB(SPE[1][i],j); +#define DOXOR(x,y,i) j=B.b[i]; x^=SPTAB(SPE[0][i],j); y^=SPTAB(SPE[1][i],j) #else /* use this if "k" is allocated to a register ... */ -#define DOXOR(x,y,i) k=B.b[i]; x^=SPTAB(SPE[0][i],k); y^=SPTAB(SPE[1][i],k); +#define DOXOR(x,y,i) k=B.b[i]; x^=SPTAB(SPE[0][i],k); y^=SPTAB(SPE[1][i],k) #endif #endif diff --git a/src/kauth/test/test_getticket.c b/src/kauth/test/test_getticket.c index 535ba5546d..a6ca374d9a 100644 --- a/src/kauth/test/test_getticket.c +++ b/src/kauth/test/test_getticket.c @@ -133,9 +133,9 @@ SetFields(conn, name, flags, expiration, lifetime) } } -#define SetLife(c,n,l) SetFields (c,n,0,0,l); -#define SetExp(c,n,e) SetFields (c,n,0,e,0); -#define SetFlags(c,n,f) SetFields (c,n,f,0,0); +#define SetLife(c,n,l) SetFields (c,n,0,0,l) +#define SetExp(c,n,e) SetFields (c,n,0,e,0) +#define SetFlags(c,n,f) SetFields (c,n,f,0,0) #define EXACT 0x5b #define KERBEROS 0x2a diff --git a/src/lwp/lock.h b/src/lwp/lock.h index a3233f8802..c0081fba33 100644 --- a/src/lwp/lock.h +++ b/src/lwp/lock.h @@ -45,8 +45,8 @@ #ifdef AFS_PTHREAD_ENV #include #include -#define LOCK_LOCK(A) opr_mutex_enter(&(A)->mutex); -#define LOCK_UNLOCK(A) opr_mutex_exit(&(A)->mutex); +#define LOCK_LOCK(A) opr_mutex_enter(&(A)->mutex) +#define LOCK_UNLOCK(A) opr_mutex_exit(&(A)->mutex) #else /* AFS_PTHREAD_ENV */ #define LOCK_LOCK(A) #define LOCK_UNLOCK(A) diff --git a/src/mcas/gc.c b/src/mcas/gc.c index 53812c4834..4268178aeb 100644 --- a/src/mcas/gc.c +++ b/src/mcas/gc.c @@ -54,7 +54,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /* Recycled nodes are filled with this value if WEAK_MEM_ORDER. */ #define INVALID_BYTE 0 -#define INITIALISE_NODES(_p,_c) memset((_p), INVALID_BYTE, (_c)); +#define INITIALISE_NODES(_p,_c) memset((_p), INVALID_BYTE, (_c)) /* Number of unique block sizes we can deal with. Equivalently, the * number of unique object caches which can be created. */ diff --git a/src/mcas/skip_cas_func.c b/src/mcas/skip_cas_func.c index daeced3677..1ddebab433 100644 --- a/src/mcas/skip_cas_func.c +++ b/src/mcas/skip_cas_func.c @@ -78,7 +78,7 @@ static int gc_id[NUM_LEVELS]; * PRIVATE FUNCTIONS */ -#define compare_keys(s, k1, k2) (s->cmpf(k1, k2)); +#define compare_keys(s, k1, k2) (s->cmpf(k1, k2)) /* * Random level generator. Drop-off rate is 0.5 per level. diff --git a/src/platform/DARWIN/AFSPreference/global.h b/src/platform/DARWIN/AFSPreference/global.h index 8d97861916..fc45729a97 100644 --- a/src/platform/DARWIN/AFSPreference/global.h +++ b/src/platform/DARWIN/AFSPreference/global.h @@ -26,7 +26,7 @@ #define kDoYouWantCreateTheDirectory NSLocalizedStringFromTableInBundle(@"DoYouWantCreateTheDirectory",nil,[NSBundle bundleForClass:[self class]],@"DoYouWantCreateTheDirectory") #define kDirectoryCreated NSLocalizedStringFromTableInBundle(@"DirectoryCreated",nil,[NSBundle bundleForClass:[self class]],@"DirectoryCreated") #define kErrorCreatingDirectory NSLocalizedStringFromTableInBundle(@"ErrorCreatingDirectory",nil,[NSBundle bundleForClass:[self class]],@"ErrorCreatingDirectory") -#define kErrorGettongSystemVersion NSLocalizedString(@"ErrorGettongSystemVersion",@"ErrorGettongSystemVersion"); +#define kErrorGettongSystemVersion NSLocalizedString(@"ErrorGettongSystemVersion",@"ErrorGettongSystemVersion") // PREFERENCE KEY diff --git a/src/rx/NBSD/rx_kmutex.h b/src/rx/NBSD/rx_kmutex.h index 80f588debd..7e11340104 100644 --- a/src/rx/NBSD/rx_kmutex.h +++ b/src/rx/NBSD/rx_kmutex.h @@ -40,7 +40,7 @@ typedef kmutex_t afs_kmutex_t; #define MUTEX_INIT(a,b,c,d) mutex_init((a), (c), IPL_NONE) #define MUTEX_DESTROY(a) mutex_destroy((a)) -#define MUTEX_ENTER(a) mutex_enter((a)); +#define MUTEX_ENTER(a) mutex_enter((a)) #define MUTEX_TRYENTER(a) mutex_tryenter((a)) #define MUTEX_EXIT(a) mutex_exit((a)) #define MUTEX_ASSERT(a) osi_Assert(mutex_owned((a))) diff --git a/src/util/serverLog.c b/src/util/serverLog.c index 98211a4078..8d89d95eb2 100644 --- a/src/util/serverLog.c +++ b/src/util/serverLog.c @@ -33,8 +33,8 @@ #if defined(AFS_PTHREAD_ENV) #include static pthread_mutex_t serverLogMutex; -#define LOCK_SERVERLOG() opr_Verify(pthread_mutex_lock(&serverLogMutex) == 0); -#define UNLOCK_SERVERLOG() opr_Verify(pthread_mutex_unlock(&serverLogMutex) == 0); +#define LOCK_SERVERLOG() opr_Verify(pthread_mutex_lock(&serverLogMutex) == 0) +#define UNLOCK_SERVERLOG() opr_Verify(pthread_mutex_unlock(&serverLogMutex) == 0) #ifdef AFS_NT40_ENV #define NULLDEV "NUL" diff --git a/src/viced/host.h b/src/viced/host.h index eb896302ea..27092bb9d6 100644 --- a/src/viced/host.h +++ b/src/viced/host.h @@ -24,8 +24,8 @@ #include #include extern pthread_mutex_t host_glock_mutex; -#define H_LOCK opr_mutex_enter(&host_glock_mutex); -#define H_UNLOCK opr_mutex_exit(&host_glock_mutex); +#define H_LOCK opr_mutex_enter(&host_glock_mutex) +#define H_UNLOCK opr_mutex_exit(&host_glock_mutex) extern pthread_key_t viced_uclient_key; #define h_MAXHOSTTABLEENTRIES 1000 diff --git a/src/viced/viced.h b/src/viced/viced.h index 3ff05342d8..d2f069932c 100644 --- a/src/viced/viced.h +++ b/src/viced/viced.h @@ -195,11 +195,11 @@ extern int saneacls; * HostCheck, Signal, min 2 for RXSTATS */ #include extern pthread_mutex_t fileproc_glock_mutex; -#define FS_LOCK opr_mutex_enter(&fileproc_glock_mutex); -#define FS_UNLOCK opr_mutex_exit(&fileproc_glock_mutex); +#define FS_LOCK opr_mutex_enter(&fileproc_glock_mutex) +#define FS_UNLOCK opr_mutex_exit(&fileproc_glock_mutex) extern pthread_mutex_t fsync_glock_mutex; -#define FSYNC_LOCK opr_mutex_enter(&fsync_glock_mutex); -#define FSYNC_UNLOCK opr_mutex_exit(&fsync_glock_mutex); +#define FSYNC_LOCK opr_mutex_enter(&fsync_glock_mutex) +#define FSYNC_UNLOCK opr_mutex_exit(&fsync_glock_mutex) #ifdef AFS_DEMAND_ATTACH_FS