Neither "ether_to_str()" nor "ip_to_str()" modify the data pointed to by

their arguments, so make those arguments pointers to 'const", so that we
don't get complaints if somebody hands them a pointer to "const".

svn path=/trunk/; revision=158
This commit is contained in:
Guy Harris 1999-01-05 07:33:38 +00:00
parent 1f3c0250b6
commit e808e2a733
2 changed files with 6 additions and 6 deletions

View File

@ -1,7 +1,7 @@
/* packet.c
* Routines for packet disassembly
*
* $Id: packet.c,v 1.16 1999/01/02 06:10:53 gram Exp $
* $Id: packet.c,v 1.17 1999/01/05 07:33:38 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -57,7 +57,7 @@ extern GdkFont *m_r_font, *m_b_font;
extern capture_file cf;
gchar *
ether_to_str(guint8 *ad) {
ether_to_str(const guint8 *ad) {
static gchar str[3][18];
static gchar *cur;
@ -74,7 +74,7 @@ ether_to_str(guint8 *ad) {
}
gchar *
ip_to_str(guint8 *ad) {
ip_to_str(const guint8 *ad) {
static gchar str[3][16];
static gchar *cur;

View File

@ -1,7 +1,7 @@
/* packet.h
* Definitions for packet disassembly structures and routines
*
* $Id: packet.h,v 1.31 1999/01/04 09:13:45 guy Exp $
* $Id: packet.h,v 1.32 1999/01/05 07:33:38 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@ -494,8 +494,8 @@ void dissect_ip_tcp_options(GtkWidget *, const u_char *, int, guint,
ip_tcp_opt *, int, int);
/* Utility routines used by packet*.c */
gchar* ether_to_str(guint8 *);
gchar* ip_to_str(guint8 *);
gchar* ether_to_str(const guint8 *);
gchar* ip_to_str(const guint8 *);
void packet_hex_print(GtkText *, guint8 *, gint, gint, gint);
#define E_TREEINFO_START_KEY "tree_info_start"
#define E_TREEINFO_LEN_KEY "tree_info_len"