Ethereal-dev: Re: [Ethereal-dev] unused parameters in wcp, x11, v120 and socks removed

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

From: Guy Harris <gharris@xxxxxxxxx>
Date: Thu, 11 Apr 2002 02:39:27 -0700
On Tue, Apr 09, 2002 at 06:18:40PM +0200, Joerg Mayer wrote:
> patch with changelog attached.

Checked in (except for the

> @@ -1135,7 +1134,7 @@
>  
>  #define STRING16_MAX_DISPLAYED_LENGTH 150
>  
> -static int stringIsActuallyAn8BitString(tvbuff_t *tvb, int offset, unsigned length)
> +static int stringIsActuallyAn8BitString(tvbuff_t *tvb, unsigned length)
>  {
>        if (length > STRING16_MAX_DISPLAYED_LENGTH) length = STRING16_MAX_DISPLAYED_LENGTH;
>        for(; length > 0; cur_offset += 2, length--) {
> @@ -1155,7 +1154,7 @@
>        int truncated = FALSE;
>        unsigned l = length / 2;
>  
> -      if (stringIsActuallyAn8BitString(tvb, offset, l)) {
> +      if (stringIsActuallyAn8BitString(tvb, l)) {
>  	    char *dp;
>  	    int soffset = offset;
>  

changes - I'm a bit suspicious that the fact that it works on
"cur_offset" rather than "offset" may be a bug; the X11 dissector needs
to have its heavy use of global variables cleaned up a bit, but it's
2:38 in the morning and I'm not about to do that now, so I'll leave that
one in as an indication that more work is needed).