On Tue, 22 Nov 2005, David Berry wrote:
> I see datFind now expects loc2 to be initialised to NULL on entry. Since
> this is simply a returned value why does it need to be initialised to NULL
> by the caller?
In fact the same seems to be true of all functions that return locators.
E.g. datCell needs the returned locator to be initialised to NULL before
being called.
Couldn't the following section of dat1_alloc_lcp.c be changed:
/* Check that the locator is NULL */
if (*loc != NULL ) {
hds_gl_status = DAT__LOCIN;
emsRep( "DAT1_ALLOC_LCP",
"Supplied locator is not a NULL pointer (Possible programming e$
&hds_gl_status);
return hds_gl_status;
}
Maybe simply to:
/* Ensure that the locator is NULL */
*loc = NULL;
???
David
|