Opened 17 years ago

Closed 17 years ago

#2158 closed defect (fixed)

Use correct return values in changes related to RFC-24

Reported by: dmorissette Owned by: dmorissette
Priority: normal Milestone: 5.0 release
Component: MapServer C Library Version: 5.0
Severity: normal Keywords:
Cc: umberto, warmerdam

Description

I noticed that many of the changes to dynamically allocate objects in r6308 and r6318 (RFC-24 related) do not use the correct return value when the allocation of objects fails.

This is because in MapServer some functions return MS_SUCCESS/MS_FAILURE and others return 0 for success and -1 for failure, but MS_FAILURE != -1 ... so it is not correct to return MS_FAILURE in a function that is expected to return -1 on error.

We need to walk through all the changes and fix that.

Change History (2)

comment:1 by dmorissette, 17 years ago

Milestone: 5.0 release
Status: newassigned
Version: 5.0

I am currently working on fixing the return values for the r6308 and r6318 changesets.

While doing that I noticed that we have the same problem with earlier changes related to allocating layerObj. :(

comment:2 by dmorissette, 17 years ago

Resolution: fixed
Status: assignedclosed

In addition to r6308 and 6318 I have also reviewed the changes from r6016, r6023 and r6031 and hopefully all the dynamic allocations from RFC-24 now return the right return values.

Fixed in r6331

Note: See TracTickets for help on using tickets.