From 01404206b9c50d3b30f70344fbc3ca09d3e1244e Mon Sep 17 00:00:00 2001 From: Eivind Eklund Date: Thu, 23 Apr 1998 14:12:06 +0000 Subject: [PATCH] Convert timespecclear() back to an expression (this time without sideeffects). --- sys/sys/time.h | 9 +++------ sys/sys/timetc.h | 9 +++------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/sys/sys/time.h b/sys/sys/time.h index 38b0ffcdb5be..44750b7c5900 100644 --- a/sys/sys/time.h +++ b/sys/sys/time.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)time.h 8.5 (Berkeley) 5/4/95 - * $Id: time.h,v 1.24 1998/04/06 08:26:08 phk Exp $ + * $Id: time.h,v 1.25 1998/04/23 00:11:32 eivind Exp $ */ #ifndef _SYS_TIME_H_ @@ -158,7 +158,7 @@ struct timecounter { #ifdef KERNEL /* Operations on timespecs */ -#define timespecclear(tvp) (tvp)->tv_sec = (tvp)->tv_nsec = 0 +#define timespecclear(tvp) ((tvp)->tv_sec = (tvp)->tv_nsec = 0) #define timespecisset(tvp) ((tvp)->tv_sec || (tvp)->tv_nsec) #define timespeccmp(tvp, uvp, cmp) \ (((tvp)->tv_sec == (uvp)->tv_sec) ? \ @@ -198,10 +198,7 @@ struct timecounter { #ifndef KERNEL /* NetBSD/OpenBSD compatable interfaces */ -#define timerclear(tvp) \ - do { \ - (tvp)->tv_sec = (tvp)->tv_usec = 0; \ - } while(0) +#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0 #define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) #define timercmp(tvp, uvp, cmp) \ (((tvp)->tv_sec == (uvp)->tv_sec) ? \ diff --git a/sys/sys/timetc.h b/sys/sys/timetc.h index 38b0ffcdb5be..44750b7c5900 100644 --- a/sys/sys/timetc.h +++ b/sys/sys/timetc.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)time.h 8.5 (Berkeley) 5/4/95 - * $Id: time.h,v 1.24 1998/04/06 08:26:08 phk Exp $ + * $Id: time.h,v 1.25 1998/04/23 00:11:32 eivind Exp $ */ #ifndef _SYS_TIME_H_ @@ -158,7 +158,7 @@ struct timecounter { #ifdef KERNEL /* Operations on timespecs */ -#define timespecclear(tvp) (tvp)->tv_sec = (tvp)->tv_nsec = 0 +#define timespecclear(tvp) ((tvp)->tv_sec = (tvp)->tv_nsec = 0) #define timespecisset(tvp) ((tvp)->tv_sec || (tvp)->tv_nsec) #define timespeccmp(tvp, uvp, cmp) \ (((tvp)->tv_sec == (uvp)->tv_sec) ? \ @@ -198,10 +198,7 @@ struct timecounter { #ifndef KERNEL /* NetBSD/OpenBSD compatable interfaces */ -#define timerclear(tvp) \ - do { \ - (tvp)->tv_sec = (tvp)->tv_usec = 0; \ - } while(0) +#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0 #define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) #define timercmp(tvp, uvp, cmp) \ (((tvp)->tv_sec == (uvp)->tv_sec) ? \