[Scummvm-cvs-logs] SF.net SVN: scummvm:[47536] tools/trunk
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Mon Jan 25 01:58:03 CET 2010
Revision: 47536
http://scummvm.svn.sourceforge.net/scummvm/?rev=47536&view=rev
Author: lordhoto
Date: 2010-01-25 00:58:03 +0000 (Mon, 25 Jan 2010)
Log Message:
-----------
There is no need to assure the pointer passed to delete/delete[]/free is non-NULL.
Modified Paths:
--------------
tools/trunk/encode_dxa.cpp
tools/trunk/engines/gob/extract_gob_stk.cpp
tools/trunk/engines/parallaction/extract_parallaction.cpp
Modified: tools/trunk/encode_dxa.cpp
===================================================================
--- tools/trunk/encode_dxa.cpp 2010-01-25 00:45:52 UTC (rev 47535)
+++ tools/trunk/encode_dxa.cpp 2010-01-25 00:58:03 UTC (rev 47536)
@@ -621,8 +621,8 @@
}
}
- if (image) delete[] image;
- if (palette) delete[] palette;
+ delete[] image;
+ delete[] palette;
if (r)
break;
Modified: tools/trunk/engines/gob/extract_gob_stk.cpp
===================================================================
--- tools/trunk/engines/gob/extract_gob_stk.cpp 2010-01-25 00:45:52 UTC (rev 47535)
+++ tools/trunk/engines/gob/extract_gob_stk.cpp 2010-01-25 00:58:03 UTC (rev 47536)
@@ -106,8 +106,7 @@
uint16 numDataChunks = stk.readUint16LE();
// If we are run multiple times, free previous chunk list
- if (_chunks)
- delete _chunks;
+ delete _chunks;
_chunks = new Chunk;
Chunk *curChunk = _chunks;
char *fakeTotPtr;
Modified: tools/trunk/engines/parallaction/extract_parallaction.cpp
===================================================================
--- tools/trunk/engines/parallaction/extract_parallaction.cpp 2010-01-25 00:45:52 UTC (rev 47535)
+++ tools/trunk/engines/parallaction/extract_parallaction.cpp 2010-01-25 00:58:03 UTC (rev 47536)
@@ -63,8 +63,7 @@
}
void Archive::closeSubfile() {
- if (_fileData)
- free(_fileData);
+ free(_fileData);
_fileData = NULL;
_fileSize = 0;
_filePos = 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list