]> hydra-www.ietfng.org Git - xv6-public/commitdiff
Coding style.
authorPeter H. Froehlich <peter.hans.froehlich@gmail.com>
Thu, 5 Nov 2015 21:40:29 +0000 (16:40 -0500)
committerPeter H. Froehlich <peter.hans.froehlich@gmail.com>
Thu, 5 Nov 2015 21:40:29 +0000 (16:40 -0500)
cmos.c

diff --git a/cmos.c b/cmos.c
index 6036031a13aa63b90a9228198d44eabd32d24735..68fcb90853b5db970889c659a06deb068076562d 100644 (file)
--- a/cmos.c
+++ b/cmos.c
@@ -47,17 +47,17 @@ void cmostime(struct rtcdate *r)
   bcd = (sb & CMOS_BINARY_BIT) == 0;
 
   // make sure CMOS doesn't modify time while we read it
-  for (;;) {
+  for(;;){
     fill_rtcdate(&t1);
-    if (cmosread(CMOS_STATA) & CMOS_UIP_BIT)
-        continue;
+    if(cmosread(CMOS_STATA) & CMOS_UIP_BIT)
+      continue;
     fill_rtcdate(&t2);
-    if (memcmp(&t1, &t2, sizeof(t1)) == 0)
+    if(memcmp(&t1, &t2, sizeof(t1)) == 0)
       break;
   }
 
   // convert
-  if (bcd) {
+  if(bcd){
 #define    CONV(x)     (t1.x = ((t1.x >> 4) * 10) + (t1.x & 0xf))
     CONV(second);
     CONV(minute);