IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Opened 22 years ago

Closed 22 years ago

Last modified 22 years ago

#165 closed enhancement (fixed)

Various realloc functions refuse to handle NULL pointers

Reported by: rhl@… Owned by: robert.desonia@…
Priority: normal Milestone:
Component: sys Version: unspecified
Severity: minor Keywords:
Cc:

Description

realloc(NULL, n) is defined to be the same as malloc(n); we should follow this convention
for all of our realloc functions (e.g. psVectorRealloc)

Change History (2)

comment:1 by Paul Price, 22 years ago

Owner: changed from Paul Price to robert.desonia@…

comment:2 by robert.desonia@…, 22 years ago

Resolution: fixed
Status: newclosed

Checked the realloc routines and all but psVectorRealloc and psArrayRealloc
behave as you expected. psVectorRealloc, however, can not do this because
without a input vector to resize, there is no way to determine the desired
datatype for the resulting vector.

As psArrayRealloc was based on psVectorRealloc, it had the same behaviour, but
since it does not support have multiple datatypes (just void*), I changed it to
behave more like psRealloc.

Note: See TracTickets for help on using tickets.