diff options
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 !!! |