[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: CVS update: subversion/subversion/libsvn_delta vcdiff_parse.c

From: Karl Fogel <kfogel_at_galois.collab.net>
Date: 2000-10-03 23:12:55 CEST

Greg Hudson <ghudson@MIT.EDU> writes:
> > + (svn_txdelta_window_t *) apr_pcalloc (parser->subpool,
> > + sizeof(svn_txdelta_window_t));
>
> So, zeroing out the bytes of a pointer and assuming it will have the
> value of NULL is not correct C, although it tends to work in practice.
> (It's also not clean, in my opinion, even with integral types.) So
> any pointer fields of the allocated svn_txdelta_window_t should not be
> assumed to be NULL. If you're aware of this and don't care, that's
> okay, but I thought I'd make sure.

Oh -- actually, that's why I made that change (plus a much larger one
right after it). One can't reliably assume that pointer fields in the
new structure will be NULL after this? If not, I'll need to change a
few places in the code... Can you elaborate? Thanks.

> Apologies for failing to update the vcdiff_parse code when I changed
> the window structure; I wasn't really aware of it at the time.

No need to apologize -- you've done a tremendous amount! It was an
easy fix, anyway.
Received on Sat Oct 21 14:36:10 2006

This is an archived mail posted to the Subversion Dev mailing list.