summaryrefslogtreecommitdiffstats
path: root/sys/sys/timetc.h
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>1998-12-15 17:38:33 +0000
committerdes <des@FreeBSD.org>1998-12-15 17:38:33 +0000
commitecc123364e6a7526722a84f1da31f02d19881809 (patch)
treea9df5fc43f99bb4c66df32788ff05be437892fa6 /sys/sys/timetc.h
parent7c6a9a207833b1b036726d7660acfd3630bf64c2 (diff)
downloadFreeBSD-src-ecc123364e6a7526722a84f1da31f02d19881809.zip
FreeBSD-src-ecc123364e6a7526722a84f1da31f02d19881809.tar.gz
Wrap two macros into do { ... } while (0), and fix the way they're used
in the kernel. Reviewed by: bde
Diffstat (limited to 'sys/sys/timetc.h')
-rw-r--r--sys/sys/timetc.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/sys/sys/timetc.h b/sys/sys/timetc.h
index 5a0cb5d..b6b7d28 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.33 1998/06/09 13:10:54 phk Exp $
+ * $Id: time.h,v 1.34 1998/10/23 10:42:42 phk Exp $
*/
#ifndef _SYS_TIME_H_
@@ -56,14 +56,16 @@ struct timespec {
};
#endif
-#define TIMEVAL_TO_TIMESPEC(tv, ts) { \
- (ts)->tv_sec = (tv)->tv_sec; \
- (ts)->tv_nsec = (tv)->tv_usec * 1000; \
-}
-#define TIMESPEC_TO_TIMEVAL(tv, ts) { \
- (tv)->tv_sec = (ts)->tv_sec; \
- (tv)->tv_usec = (ts)->tv_nsec / 1000; \
-}
+#define TIMEVAL_TO_TIMESPEC(tv, ts) \
+ do { \
+ (ts)->tv_sec = (tv)->tv_sec; \
+ (ts)->tv_nsec = (tv)->tv_usec * 1000; \
+ } while (0)
+#define TIMESPEC_TO_TIMEVAL(tv, ts) \
+ do { \
+ (tv)->tv_sec = (ts)->tv_sec; \
+ (tv)->tv_usec = (ts)->tv_nsec / 1000; \
+ } while (0)
struct timezone {
int tz_minuteswest; /* minutes west of Greenwich */
OpenPOWER on IntegriCloud