Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/powerpc/powerpc > Can we use c99 field initializers...



details:   https://anonhg.NetBSD.org/src/rev/b0842e25cca9
branches:  trunk
changeset: 794591:b0842e25cca9
user:      macallan <macallan%NetBSD.org@localhost>
date:      Tue Mar 18 20:11:08 2014 +0000

description:
> Can we use c99 field initializers here instead of comments?!?

Yes, yes we can.

diffstat:

 sys/arch/powerpc/powerpc/clock.c |  36 ++++++++++++++++++------------------
 1 files changed, 18 insertions(+), 18 deletions(-)

diffs (61 lines):

diff -r 6568631d9fef -r b0842e25cca9 sys/arch/powerpc/powerpc/clock.c
--- a/sys/arch/powerpc/powerpc/clock.c  Tue Mar 18 19:30:09 2014 +0000
+++ b/sys/arch/powerpc/powerpc/clock.c  Tue Mar 18 20:11:08 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: clock.c,v 1.15 2014/03/18 14:34:31 macallan Exp $      */
+/*     $NetBSD: clock.c,v 1.16 2014/03/18 20:11:08 macallan Exp $      */
 /*      $OpenBSD: clock.c,v 1.3 1997/10/13 13:42:53 pefo Exp $ */
 
 /*
@@ -33,7 +33,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.15 2014/03/18 14:34:31 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.16 2014/03/18 20:11:08 macallan Exp $");
 
 #include <sys/param.h>
 #include <sys/kernel.h>
@@ -68,26 +68,26 @@
 
 #ifdef PPC_OEA601
 static struct timecounter powerpc_601_timecounter = {
-       get_601_timecount,      /* get_timecount */
-       0,                      /* no poll_pps */
-       0x7fffffff,             /* counter_mask */
-       0,                      /* frequency */
-       "rtc",                  /* name */
-       100,                    /* quality */
-       NULL,                   /* tc_priv */
-       NULL                    /* tc_next */
+       .tc_get_timecount = get_601_timecount,
+       .tc_poll_pps = 0,
+       .tc_counter_mask = 0x7fffffff,
+       .tc_frequency = 0,
+       .tc_name = "rtc",
+       .tc_quality = 100,
+       .tc_priv = NULL,
+       .tc_next = NULL
 };
 #endif
 
 static struct timecounter powerpc_timecounter = {
-       get_powerpc_timecount,  /* get_timecount */
-       0,                      /* no poll_pps */
-       0x7fffffff,             /* counter_mask */
-       0,                      /* frequency */
-       "mftb",                 /* name */
-       100,                    /* quality */
-       NULL,                   /* tc_priv */
-       NULL                    /* tc_next */
+       .tc_get_timecount = get_powerpc_timecount,
+       .tc_poll_pps = 0,
+       .tc_counter_mask = 0x7fffffff,
+       .tc_frequency = 0,
+       .tc_name = "mftb",
+       .tc_quality = 100,
+       .tc_priv = NULL,
+       .tc_next = NULL
 };
 
 /*



Home | Main Index | Thread Index | Old Index