On Mon, 2005-12-26 at 17:56 +0100, Patrick Leslie Polzer wrote: > On Mon, 26 Dec 2005 10:34:28 -0600 > Harley D. Eades III <"Harley D. Eades III" <[EMAIL PROTECTED]>> wrote: > > | What is the difference between what I have and a PED_ASSERT? All the > | PED_ASSERT will do is return if pth is NULL, right? The function as is > | will not free anything unless there is memory, which is in my mind > | correct. > The problem is the crash that will occur when you dereference the pointer in > > if (pth->Reserved2) > > If pth is NULL, for which you check afterwards (never reached in this case!), > the program will crash. > > As for the assertion, it will throw a fatal exception if it is not fullfilled > instead of just returning.
Thanks, I just wanted to fully understand. > HTH, Yes it does. -- Harley -----BEGIN GEEK CODE BLOCK----- G: GCS-- d- a? C++++ B- E+++ W+++ N++ w--- X+++ b++ G e* r x+ z+++++ ------END GEEK CODE BLOCK------ _______________________________________________ Bug-parted mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-parted
