Closed tbonfort closed 12 years ago
Author: hobu Date: 2007/08/04 - 04:49 added msHashIsEmpty in cd91e2ddc837d5b4899057ac53d95030917fcf03 (r6458)
Author: hobu Date: 2007/08/04 - 04:53 A couple of related questions about msFreeHashItems....
We shouldn't be using naked free's there right? Should we be using msFree?
Also, if the hash table is empty, why is it an error?
Author: hobu Date: 2007/08/04 - 04:55 34f110bc770c9b65e360b8d8fb52f16626943806 (r6459) just hops out of the function if the table is empty. Please revert if this is incorrect.
Author: sdlime Date: 2007/08/04 - 16:52 I applied the msHashIsEmpty check in mapfile.c so that empty metadata blocks are not output.
One question, is there any benefit to implementing msHashIsEmpty as a macro as opposed to a function? Just wondering from a programming convention.
Howard, regarding changes in 34f110bc770c9b65e360b8d8fb52f16626943806 (r6459), I moved the empty table check inside the if (table) check and that won't trigger an error. I did leave the other check on table->items just in case and it throws a more specific error (something is really screwed up if that ever showed up). Also changed to msFree's for the key/value un-allocations. 36a52922c680b5a60e49c4e4dcd6cd8f484490cc (r6461)
Marking as fixed.
Steve
Reporter: hobu Date: 2007/08/03 - 19:40 It seems that we are now keeping empty METADATA blocks around for these items. They show up when we do a mapObj.save().