Source-Changes-HG archive

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

[src/trunk]: src/sbin/amrctl constify number to string lookup tables



details:   https://anonhg.NetBSD.org/src/rev/8dc362cff1d8
branches:  trunk
changeset: 779314:8dc362cff1d8
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Fri May 18 13:41:37 2012 +0000

description:
constify number to string lookup tables

diffstat:

 sbin/amrctl/amrctl.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (48 lines):

diff -r 80fb4eb41bf7 -r 8dc362cff1d8 sbin/amrctl/amrctl.c
--- a/sbin/amrctl/amrctl.c      Fri May 18 12:45:43 2012 +0000
+++ b/sbin/amrctl/amrctl.c      Fri May 18 13:41:37 2012 +0000
@@ -90,7 +90,7 @@
 #define FIRMWARE_40LD  1
 #define FIRMWARE_8LD   2
 
-static struct {
+static const struct {
        const char      *product;
        const uint32_t  signature;
 } prodtable[] = {
@@ -104,7 +104,7 @@
        {       "Series 490",                   AMR_SIG_490     }
 };
 
-static struct {
+static const struct {
        const int       code;
        const char      *ifyes, *ifno;
 } proptable[] = {
@@ -116,7 +116,7 @@
                "adaptative-io",        "no-adaptative-io"      }
 };
 
-static struct {
+static const struct {
        const int       code;
        const char      *status;
 } statetable[] = {
@@ -129,7 +129,7 @@
        {       AMR_DRV_HOTSPARE,       "hotspare"      }
 };
 
-static struct {
+static const struct {
        const u_int8_t  code;
        const char              *status;
 } battable[] = {
@@ -140,7 +140,7 @@
        {       AMR_BATT_CYCLES_EXCEEDED,       "cycle exceeded"        }
 };
 
-static struct {
+static const struct {
        const u_int8_t  code;
        const char              *status;
 } bcstatble[] = {



Home | Main Index | Thread Index | Old Index