Ethereal-dev: Re: [Ethereal-dev] MSVC warning: packet-per.c(332) : warning C4700: Lokale Varia

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: Tue, 12 Oct 2004 01:07:41 -0700
ronnie sahlberg wrote:

the entire
if(!length){ /* there is no string at all, so dont do any byte alignment */
    byte_aligned=FALSE;
  }
should be moved down to just before the if(byte_aligned){
    if(offset&0x07){
      offset=(offset&0xfffffff8)+8;
    }
  }
block.

I.e., byte_aligned should be set to false even for unconstrained strings if the length determinant says it's zero-length?