Ethereal-dev: Re: [Ethereal-dev] [patch] fix for dissect_nt_sid

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

From: Tim Potter <tpot@xxxxxxxxx>
Date: Sat, 26 Jan 2002 09:49:29 +1100
On Fri, Jan 25, 2002 at 12:02:41AM -0800, Guy Harris wrote:

> > > Hi everyone.  Here is a small patch to do with NT SID dissection:
> > 
> > Doh - this time I will actually attach it.
> 
> Checked in.

Thanks.

> > +		/* Align to four byte boundary */
> > +
> > +		offset += 4 - (offset % 4);
> 
> You meant something such as
> 
> 		offset = ((offset + 3)/4)*4;

Yes - I forgot the first bit I usually put in which is

	if (offset % 4)

I find that a bit more readable than the +3/4*4 business.

> > +//		proto_tree_add_item(tree, hf_domain_sid, tvb, offset,
> > +//		    domain_sid_size, TRUE);
> > +//		offset += domain_sid_size;
> 
> Some C compilers do not, by default, like C++ comments (IBM's C compiler
> for AIX doesn't); use C comments in C code.  (I just removed the code
> completely, rather than changing the way it was commented out.)

Whoops - that was leftover crap from some other stuff I was mucking
around with.  I should have read the patch more clearly!


Regards,

Tim.