Open tbonfort opened 12 years ago
Author: dmorissette Date: 2007/07/17 - 22:25 I am currently working on fixing the return values for the 1c785fdc5e192893a9ee13c5642fe1a777c8eb6c (r6308) and b4ffea0683c9bffe75e322aef8cc244e2a311b85 (r6318) changesets.
While doing that I noticed that we have the same problem with earlier changes related to allocating layerObj. :(
Author: dmorissette Date: 2007/07/17 - 22:44 In addition to 1c785fdc5e192893a9ee13c5642fe1a777c8eb6c (r6308) and 6318 I have also reviewed the changes from c2b96efe2d8547d1bf8895200ed65fb45e72769d (r6016), bc451bf282ec47acfc77b3cb3d0b95c07068479f (r6023) and 175e3d8b960a64650d310e37adbe776885a4f391 (r6031) and hopefully all the dynamic allocations from RFC-24 now return the right return values.
Fixed in 7669cd3397cdd1981338273812da091750f4a0b5 (r6331)
Reporter: dmorissette Date: 2007/07/17 - 22:24 I noticed that many of the changes to dynamically allocate objects in 1c785fdc5e192893a9ee13c5642fe1a777c8eb6c (r6308) and b4ffea0683c9bffe75e322aef8cc244e2a311b85 (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.