diff options
author | Guy Harris <guy@alum.mit.edu> | 2003-12-21 22:21:45 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2003-12-21 22:21:45 +0000 |
commit | ecbfe2fb775c1319a8ebead2a6dbffb502d2637d (patch) | |
tree | 2a8a49be85cfb0d85fdafd5ed7ec77ab5229d0d6 /gtk/ansi_map_stat.c | |
parent | 9ce5cd3548b89e8ae572f7ba91cb9df0e985467b (diff) | |
download | wireshark-ecbfe2fb775c1319a8ebead2a6dbffb502d2637d.tar.gz wireshark-ecbfe2fb775c1319a8ebead2a6dbffb502d2637d.tar.bz2 wireshark-ecbfe2fb775c1319a8ebead2a6dbffb502d2637d.zip |
"sizeof(array)" is the size of the array in bytes, not the number of
elements in the array.
svn path=/trunk/; revision=9398
Diffstat (limited to 'gtk/ansi_map_stat.c')
-rw-r--r-- | gtk/ansi_map_stat.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gtk/ansi_map_stat.c b/gtk/ansi_map_stat.c index 2e016f5ac6..33a5255d2e 100644 --- a/gtk/ansi_map_stat.c +++ b/gtk/ansi_map_stat.c @@ -5,7 +5,7 @@ * * MUCH code modified from service_response_time_table.c. * - * $Id: ansi_map_stat.c,v 1.5 2003/12/17 22:13:06 guy Exp $ + * $Id: ansi_map_stat.c,v 1.6 2003/12/21 22:21:45 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -67,11 +67,12 @@ typedef struct _ansi_map_stat_dlg_t { char *entries[3]; } ansi_map_stat_dlg_t; +#define N_MESSAGE_TYPES 0xff + typedef struct _ansi_map_stat_t { - int message_type[0xff]; + int message_type[N_MESSAGE_TYPES]; } ansi_map_stat_t; - static ansi_map_stat_dlg_t dlg; static ansi_map_stat_t stat; @@ -99,7 +100,7 @@ ansi_map_stat_packet( tapdata = tapdata; pinfo = pinfo; - if (data_p->message_type > sizeof(stat.message_type)) + if (data_p->message_type > N_MESSAGE_TYPES) { /* * unknown PDU type !!! |