diff options
author | Guy Harris <guy@alum.mit.edu> | 1999-09-10 04:53:14 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 1999-09-10 04:53:14 +0000 |
commit | e425e372ca086922ff4ffba6321d4aec0f12f9f7 (patch) | |
tree | e0ba1d594fe5127f56df0b13ef71874f8779cc53 /packet-fddi.c | |
parent | b0bd01b53f39943d84332e92ec7acbc1558e9230 (diff) | |
download | wireshark-e425e372ca086922ff4ffba6321d4aec0f12f9f7.tar.gz wireshark-e425e372ca086922ff4ffba6321d4aec0f12f9f7.tar.bz2 wireshark-e425e372ca086922ff4ffba6321d4aec0f12f9f7.zip |
Have "fddifc_to_str()" return "Unknown frame type" for a frame type it
doesn't know about, and eliminate the check in "dissect_fddi()" where we
check if its return value was NULL and, if so, print "Unknown frame
type".
svn path=/trunk/; revision=644
Diffstat (limited to 'packet-fddi.c')
-rw-r--r-- | packet-fddi.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/packet-fddi.c b/packet-fddi.c index a42cd8a316..c14e2d6dde 100644 --- a/packet-fddi.c +++ b/packet-fddi.c @@ -3,7 +3,7 @@ * * Laurent Deniel <deniel@worldnet.fr> * - * $Id: packet-fddi.c,v 1.20 1999/09/10 03:16:08 gram Exp $ + * $Id: packet-fddi.c,v 1.21 1999/09/10 04:53:14 guy Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@zing.org> @@ -242,7 +242,7 @@ fddifc_to_str(int fc) break; default: - return ""; + return "Unknown frame type"; } } } @@ -292,8 +292,7 @@ void dissect_fddi(const u_char *pd, frame_data *fd, proto_tree *tree, if (tree) { ti = proto_tree_add_item_format(tree, proto_fddi, 0, offset, NULL, - "Fiber Distributed Data Interface, %s", - (fc_str == NULL) ? "Unknown frame type" : fc_str); + "Fiber Distributed Data Interface, %s", fc_str); swap_mac_addr(dst_swapped, (u_char*)&pd[FDDI_P_DHOST]); swap_mac_addr(src_swapped, (u_char*)&pd[FDDI_P_SHOST]); |