[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: ARTS_1_1_BRANCH: arts/mcop
From: George Staikos <staikos () kde ! org>
Date: 2003-06-22 21:07:03
[Download RAW message or body]
CVS commit by staikos:
a) mismatched calloc()/delete[] in object.cc
b) compare against the end of the list instead of assuming 0 initialisation even
though it looks to be supported just fine. this patch happens to return;
early so it's worth committing anyways.
M +3 -1 mcoputils.cc 1.19.4.2
M +1 -1 object.cc 1.54.4.3
--- arts/mcop/mcoputils.cc #1.19.4.1:1.19.4.2
@@ -174,6 +174,8 @@ unsigned long MCOPUtils::makeIID(const s
map<string,unsigned long>& iidmap = *iidmapobj;
- if(!iidmap[interfaceName])
+ if(iidmap.find(interfaceName) == iidmap.end()) {
iidmap[interfaceName] = nextiid++;
+ return nextiid-1; // no need to lookup in the map thrice
+ }
return iidmap[interfaceName];
--- arts/mcop/object.cc #1.54.4.2:1.54.4.3
@@ -1510,5 +1510,5 @@ void Object_stub::_cleanupMethodCache()
if(_lookupMethodCache)
{
- delete[] _lookupMethodCache;
+ free(_lookupMethodCache);
_lookupMethodCache = 0;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic