Wrap timerclear in do { ... } while(0)

This commit is contained in:
eivind 1998-04-23 00:11:32 +00:00
parent 1c00798cb4
commit a325280132
2 changed files with 10 additions and 4 deletions

View File

@ -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) ? \

View File

@ -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) ? \