summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Meier <wmeier@newsguy.com>2009-04-24 12:16:01 +0000
committerBill Meier <wmeier@newsguy.com>2009-04-24 12:16:01 +0000
commit72ef03e60a8ee4ac5768567afe7ad0437fd6ce93 (patch)
treee8832339a7818f0f8cb37e67c84902703884d5d7
parented948cc8f71ba810c115c779b854352dca136757 (diff)
downloadwireshark-72ef03e60a8ee4ac5768567afe7ad0437fd6ce93.tar.gz
[Trivial] Constify a few things
svn path=/trunk/; revision=28144
-rw-r--r--wiretap/dbs-etherwatch.c2
-rw-r--r--wiretap/nettl.c4
-rw-r--r--wiretap/netxray.c10
-rw-r--r--wiretap/ngsniffer.c2
-rw-r--r--wiretap/radcom.c6
-rw-r--r--wiretap/vms.c6
6 files changed, 15 insertions, 15 deletions
diff --git a/wiretap/dbs-etherwatch.c b/wiretap/dbs-etherwatch.c
index 221d6a4fc5..38305fd3d6 100644
--- a/wiretap/dbs-etherwatch.c
+++ b/wiretap/dbs-etherwatch.c
@@ -327,7 +327,7 @@ parse_dbs_etherwatch_packet(wtap *wth, FILE_T fh, guint8* buf, int *err,
struct tm tm;
char mon[4];
gchar *p;
- static gchar months[] = "JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC";
+ static const gchar months[] = "JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC";
int count, line_count;
eth_hdr_len = 0;
diff --git a/wiretap/nettl.c b/wiretap/nettl.c
index 0b758ae7f5..2bccaca99c 100644
--- a/wiretap/nettl.c
+++ b/wiretap/nettl.c
@@ -41,11 +41,11 @@
#define MAGIC_SIZE 12
/* HP-UX 9.x */
-static guint8 nettl_magic_hpux9[MAGIC_SIZE] = {
+static const guint8 nettl_magic_hpux9[MAGIC_SIZE] = {
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xD0, 0x00
};
/* HP-UX 10.x and 11.x */
-static guint8 nettl_magic_hpux10[MAGIC_SIZE] = {
+static const guint8 nettl_magic_hpux10[MAGIC_SIZE] = {
0x54, 0x52, 0x00, 0x64, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80
};
diff --git a/wiretap/netxray.c b/wiretap/netxray.c
index 7a000b16f7..4518701e59 100644
--- a/wiretap/netxray.c
+++ b/wiretap/netxray.c
@@ -194,7 +194,7 @@ struct netxray_hdr {
* CAPTYPE_ATM? If so, what should the table for ATM captures with
* that captype be?
*/
-static double TpS[] = { 1e6, 1193000.0, 1193182.0 };
+static const double TpS[] = { 1e6, 1193000.0, 1193182.0 };
#define NUM_NETXRAY_TIMEUNITS (sizeof TpS / sizeof TpS[0])
/*
@@ -219,7 +219,7 @@ static double TpS[] = { 1e6, 1193000.0, 1193182.0 };
* (Based upon captures reviewed realtick does not contain the
* correct TpS values for the 'gigpod' captype).
*/
-static double TpS_gigpod[] = { 1e9, 0.0, 31250000.0 };
+static const double TpS_gigpod[] = { 1e9, 0.0, 31250000.0 };
#define NUM_NETXRAY_TIMEUNITS_GIGPOD (sizeof TpS_gigpod / sizeof TpS_gigpod[0])
/*
@@ -227,7 +227,7 @@ static double TpS_gigpod[] = { 1e9, 0.0, 31250000.0 };
* (Based upon captures reviewed realtick does not contain the
* correct TpS values for the 'otherpod' captype).
*/
-static double TpS_otherpod[] = { 1e6, 0.0, 1250000.0 };
+static const double TpS_otherpod[] = { 1e6, 0.0, 1250000.0 };
#define NUM_NETXRAY_TIMEUNITS_OTHERPOD (sizeof TpS_otherpod / sizeof TpS_otherpod[0])
/*
@@ -235,7 +235,7 @@ static double TpS_otherpod[] = { 1e6, 0.0, 1250000.0 };
* (Based upon captures reviewed realtick does not contain the
* correct TpS values for the 'otherpod2' captype).
*/
-static double TpS_otherpod2[] = { 1e6, 0.0, 0.0 };
+static const double TpS_otherpod2[] = { 1e6, 0.0, 0.0 };
#define NUM_NETXRAY_TIMEUNITS_OTHERPOD2 (sizeof TpS_otherpod2 / sizeof TpS_otherpod2[0])
/*
@@ -243,7 +243,7 @@ static double TpS_otherpod2[] = { 1e6, 0.0, 0.0 };
* (Based upon captures reviewed realtick does not contain the
* correct TpS values for the 'gigpod2' captype).
*/
-static double TpS_gigpod2[] = { 1e9, 0.0, 20000000.0 };
+static const double TpS_gigpod2[] = { 1e9, 0.0, 20000000.0 };
#define NUM_NETXRAY_TIMEUNITS_GIGPOD2 (sizeof TpS_gigpod2 / sizeof TpS_gigpod2[0])
/* Version number strings. */
diff --git a/wiretap/ngsniffer.c b/wiretap/ngsniffer.c
index 912eccf25a..e6cdf42f87 100644
--- a/wiretap/ngsniffer.c
+++ b/wiretap/ngsniffer.c
@@ -447,7 +447,7 @@ struct frame6_rec {
* so that interpretation is probably wrong. Perhaps the interpretation
* of V.timeunit depends on the version number of the file?
*/
-static guint32 Psec[] = {
+static const guint32 Psec[] = {
15000000, /* 15.0 usecs = 15000000 psecs */
838096, /* .838096 usecs = 838096 psecs */
15000000, /* 15.0 usecs = 15000000 psecs */
diff --git a/wiretap/radcom.c b/wiretap/radcom.c
index 16ccd6bb40..9abacf79fa 100644
--- a/wiretap/radcom.c
+++ b/wiretap/radcom.c
@@ -50,15 +50,15 @@ struct unaligned_frame_date {
/* Found at the beginning of the file. Bytes 2 and 3 (D2:00) seem to be
* different in some captures */
-static guint8 radcom_magic[8] = {
+static const guint8 radcom_magic[8] = {
0x42, 0xD2, 0x00, 0x34, 0x12, 0x66, 0x22, 0x88
};
-static guint8 encap_magic[4] = {
+static const guint8 encap_magic[4] = {
0x00, 0x42, 0x43, 0x09
};
-static guint8 active_time_magic[11] = {
+static const guint8 active_time_magic[11] = {
0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x20, 0x54, 0x69, 0x6d, 0x65
};
diff --git a/wiretap/vms.c b/wiretap/vms.c
index 2a271753f9..51f4683cf2 100644
--- a/wiretap/vms.c
+++ b/wiretap/vms.c
@@ -370,9 +370,9 @@ parse_vms_rec_hdr(wtap *wth, FILE_T fh, int *err, gchar **err_info)
int pktnum;
int csec = 101;
struct tm tm;
- char mon[4] = {'J', 'A', 'N', 0};
+ const char mon[4] = {'J', 'A', 'N', 0};
gchar *p;
- static gchar months[] = "JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC";
+ static const gchar months[] = "JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC";
tm.tm_year = 1970;
tm.tm_hour = 1;
@@ -517,7 +517,7 @@ parse_single_hex_dump_line(char* rec, guint8 *buf, long byte_offset,
int i;
char *s;
int value;
- static int offsets[16] = {39,37,35,33,28,26,24,22,17,15,13,11,6,4,2,0};
+ static const int offsets[16] = {39,37,35,33,28,26,24,22,17,15,13,11,6,4,2,0};
char lbuf[3] = {0,0,0};