summaryrefslogtreecommitdiff
path: root/xdlc.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2000-03-14 06:03:26 +0000
committerGuy Harris <guy@alum.mit.edu>2000-03-14 06:03:26 +0000
commitbdd64cb62b759d6a3118711beb0c0d699499d098 (patch)
tree931af4a0c560f0c694a5b1d795499134ff602f4d /xdlc.c
parentfae651652098b2566cdbe6e48ceaf745111b6238 (diff)
downloadwireshark-bdd64cb62b759d6a3118711beb0c0d699499d098.tar.gz
Fix some errors discovered by making GCC do format string/argument
cross-checking, and by replacing "proto_tree_add_item_format()" by multiple routines to add items of various types. Make the arguments of "proto_tree_add_bytes_format()" and "proto_tree_add_string_format()" that specify the bytes or the string be "const" pointers, so that one can pass a "const" pointer without complaints from the compiler. Squelch a (bogus, but the compiler isn't in a position to know that) complaint about an uninitialized variable. svn path=/trunk/; revision=1716
Diffstat (limited to 'xdlc.c')
-rw-r--r--xdlc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/xdlc.c b/xdlc.c
index d6a99c9bb5..1bbd6d5fa4 100644
--- a/xdlc.c
+++ b/xdlc.c
@@ -2,7 +2,7 @@
* Routines for use by various SDLC-derived protocols, such as HDLC
* and its derivatives LAPB, IEEE 802.2 LLC, etc..
*
- * $Id: xdlc.c,v 1.12 2000/03/12 04:47:55 gram Exp $
+ * $Id: xdlc.c,v 1.13 2000/03/14 06:03:26 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
@@ -251,7 +251,7 @@ dissect_xdlc_control(const u_char *pd, int offset, frame_data *fd,
if (is_extended) {
tc = proto_tree_add_uint_format(xdlc_tree, hf_xdlc_control,
offset, 2,
- frame_type,
+ control,
"Control field: %s (0x%04X)", info, control);
control_tree = proto_item_add_subtree(tc, ett_xdlc_control);
proto_tree_add_text(control_tree, offset, 2,
@@ -272,7 +272,7 @@ dissect_xdlc_control(const u_char *pd, int offset, frame_data *fd,
} else {
tc = proto_tree_add_uint_format(xdlc_tree, hf_xdlc_control,
offset, 1,
- frame_type,
+ control,
"Control field: %s (0x%02X)", info, control);
control_tree = proto_item_add_subtree(tc, ett_xdlc_control);
proto_tree_add_text(control_tree, offset, 1,
@@ -325,7 +325,7 @@ dissect_xdlc_control(const u_char *pd, int offset, frame_data *fd,
if (xdlc_tree) {
tc = proto_tree_add_uint_format(xdlc_tree, hf_xdlc_control,
offset, 1,
- frame_type,
+ control,
"Control field: %s (0x%02X)", info, control);
control_tree = proto_item_add_subtree(tc, ett_xdlc_control);
if (control & XDLC_P_F) {
@@ -368,7 +368,7 @@ dissect_xdlc_control(const u_char *pd, int offset, frame_data *fd,
if (xdlc_tree) {
tc = proto_tree_add_uint_format(xdlc_tree, hf_xdlc_control,
offset, (is_extended) ? 2 : 1,
- frame_type,
+ control,
(is_extended) ? "Control field: %s (0x%04X)"
: "Control field: %s (0x%02X)",
info, control);