From e425e372ca086922ff4ffba6321d4aec0f12f9f7 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Fri, 10 Sep 1999 04:53:14 +0000 Subject: 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 --- packet-fddi.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'packet-fddi.c') 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 * - * $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 @@ -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]); -- cgit v1.2.3