diff --git a/sys/sys/time.h b/sys/sys/time.h index 1a8515add0f9..38b0ffcdb5be 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.23 1998/04/04 13:26:16 phk Exp $ + * $Id: time.h,v 1.24 1998/04/06 08:26:08 phk Exp $ */ #ifndef _SYS_TIME_H_ @@ -198,7 +198,10 @@ struct timecounter { #ifndef KERNEL /* NetBSD/OpenBSD compatable interfaces */ -#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0 +#define timerclear(tvp) \ + do { \ + (tvp)->tv_sec = (tvp)->tv_usec = 0; \ + } while(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 1a8515add0f9..38b0ffcdb5be 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.23 1998/04/04 13:26:16 phk Exp $ + * $Id: time.h,v 1.24 1998/04/06 08:26:08 phk Exp $ */ #ifndef _SYS_TIME_H_ @@ -198,7 +198,10 @@ struct timecounter { #ifndef KERNEL /* NetBSD/OpenBSD compatable interfaces */ -#define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0 +#define timerclear(tvp) \ + do { \ + (tvp)->tv_sec = (tvp)->tv_usec = 0; \ + } while(0) #define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) #define timercmp(tvp, uvp, cmp) \ (((tvp)->tv_sec == (uvp)->tv_sec) ? \