[Scummvm-cvs-logs] SF.net SVN: scummvm:[44467] scummvm/trunk/engines/gob/dataio.cpp

strangerke at users.sourceforge.net strangerke at users.sourceforge.net
Tue Sep 29 18:56:34 CEST 2009


Revision: 44467
          http://scummvm.svn.sourceforge.net/scummvm/?rev=44467&view=rev
Author:   strangerke
Date:     2009-09-29 16:56:30 +0000 (Tue, 29 Sep 2009)

Log Message:
-----------
Gob - Silence a Valgrind warning by initializing a variable 

Modified Paths:
--------------
    scummvm/trunk/engines/gob/dataio.cpp

Modified: scummvm/trunk/engines/gob/dataio.cpp
===================================================================
--- scummvm/trunk/engines/gob/dataio.cpp	2009-09-29 15:51:45 UTC (rev 44466)
+++ scummvm/trunk/engines/gob/dataio.cpp	2009-09-29 16:56:30 UTC (rev 44467)
@@ -361,6 +361,8 @@
 }
 
 int32 DataIO::getChunkSize(const char *chunkName, int32 &packSize) {
+	packSize = -1;
+
 	for (int16 file = 0; file < MAX_DATA_FILES; file++) {
 		if (_dataFiles[file] == 0)
 			return -1;
@@ -370,10 +372,8 @@
 			if (scumm_stricmp(chunkName, dataDesc->chunkName) != 0)
 				continue;
 
-			if (dataDesc->packed == 0) {
-				packSize = -1;
+			if (dataDesc->packed == 0)
 				return dataDesc->size;
-			}
 
 			for (int16 slot = 0; slot < MAX_SLOT_COUNT; slot++)
 				_isCurrentSlot[slot] = false;


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