ANNOUNCEMENT: Live Wireshark University & Allegro Packets online APAC Wireshark Training Session
July 17th, 2024 | 10:00am-11:55am SGT (UTC+8) | Online

Ethereal-dev: Re: [ethereal-dev] I4B trace & V.120 decoder

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <gharris@xxxxxxxxxxxx>
Date: Sun, 12 Dec 1999 15:02:25 -0800
> Here's a fresh patch without the Makefile.in junk, but including the
> packet-v120.c file.

Here's a patch to "packet-v120.c", that fixes a problem that caused a
GCC warning - it used "v120_len" regardless of whether "tree" was NULL
or not, but it only set it if "tree" was non-NULL.

I'll check this fix into CVS.
Index: packet-v120.c
===================================================================
RCS file: /usr/local/cvsroot/ethereal/packet-v120.c,v
retrieving revision 1.1
diff -c -r1.1 packet-v120.c
*** packet-v120.c	1999/12/12 22:39:29	1.1
--- packet-v120.c	1999/12/12 23:06:01
***************
*** 91,101 ****
      else
  	is_response = FALSE;
  
      if (tree) {
- 	if (fd->pkt_len <= 5)
- 		v120len = fd->pkt_len;
- 	else
- 		v120len = 5;
  	ti = proto_tree_add_item_format(tree, proto_v120, 0, v120len, NULL,
  					    "V.120");
  	v120_tree = proto_item_add_subtree(ti, ett_v120);
--- 91,101 ----
      else
  	is_response = FALSE;
  
+     if (fd->pkt_len <= 5)
+ 	v120len = fd->pkt_len;
+     else
+ 	v120len = 5;
      if (tree) {
  	ti = proto_tree_add_item_format(tree, proto_v120, 0, v120len, NULL,
  					    "V.120");
  	v120_tree = proto_item_add_subtree(ti, ett_v120);