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:
parent
1f3c0250b6
commit
e808e2a733
6
packet.c
6
packet.c
|
@ -1,7 +1,7 @@
|
||||||
/* packet.c
|
/* packet.c
|
||||||
* Routines for packet disassembly
|
* 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
|
* Ethereal - Network traffic analyzer
|
||||||
* By Gerald Combs <gerald@zing.org>
|
* By Gerald Combs <gerald@zing.org>
|
||||||
|
@ -57,7 +57,7 @@ extern GdkFont *m_r_font, *m_b_font;
|
||||||
extern capture_file cf;
|
extern capture_file cf;
|
||||||
|
|
||||||
gchar *
|
gchar *
|
||||||
ether_to_str(guint8 *ad) {
|
ether_to_str(const guint8 *ad) {
|
||||||
static gchar str[3][18];
|
static gchar str[3][18];
|
||||||
static gchar *cur;
|
static gchar *cur;
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ ether_to_str(guint8 *ad) {
|
||||||
}
|
}
|
||||||
|
|
||||||
gchar *
|
gchar *
|
||||||
ip_to_str(guint8 *ad) {
|
ip_to_str(const guint8 *ad) {
|
||||||
static gchar str[3][16];
|
static gchar str[3][16];
|
||||||
static gchar *cur;
|
static gchar *cur;
|
||||||
|
|
||||||
|
|
6
packet.h
6
packet.h
|
@ -1,7 +1,7 @@
|
||||||
/* packet.h
|
/* packet.h
|
||||||
* Definitions for packet disassembly structures and routines
|
* 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
|
* Ethereal - Network traffic analyzer
|
||||||
* By Gerald Combs <gerald@zing.org>
|
* 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);
|
ip_tcp_opt *, int, int);
|
||||||
|
|
||||||
/* Utility routines used by packet*.c */
|
/* Utility routines used by packet*.c */
|
||||||
gchar* ether_to_str(guint8 *);
|
gchar* ether_to_str(const guint8 *);
|
||||||
gchar* ip_to_str(guint8 *);
|
gchar* ip_to_str(const guint8 *);
|
||||||
void packet_hex_print(GtkText *, guint8 *, gint, gint, gint);
|
void packet_hex_print(GtkText *, guint8 *, gint, gint, gint);
|
||||||
#define E_TREEINFO_START_KEY "tree_info_start"
|
#define E_TREEINFO_START_KEY "tree_info_start"
|
||||||
#define E_TREEINFO_LEN_KEY "tree_info_len"
|
#define E_TREEINFO_LEN_KEY "tree_info_len"
|
||||||
|
|
Loading…
Reference in New Issue