# HG changeset patch # User Matti Hamalainen # Date 1425220007 -7200 # Node ID f7863608d84ca88ffc5ae4474d2d825c02e4ed3d # Parent a76056297006436a83c11fb44e74cbd0ff4593d4 Cleanup, remove debug code. diff -r a76056297006 -r f7863608d84c tools/packed.c --- a/tools/packed.c Sun Mar 01 16:20:44 2015 +0200 +++ b/tools/packed.c Sun Mar 01 16:26:47 2015 +0200 @@ -267,13 +267,13 @@ int dmPackAddFile(DMPackFile * pack, const char *filename, const Uint32 flags, const BOOL compress, int level, DMPackEntry ** ppEntry) { - z_stream zstr; Uint64 startOffs, outSize; - FILE *inFile = NULL, *tmpFile; Uint8 *inBuffer = NULL, *outBuffer = NULL; DMPackEntry entry, *node; + FILE *inFile = NULL; int ret = DMERR_OK; BOOL zinit = FALSE; + z_stream zstr; *ppEntry = NULL; @@ -321,8 +321,6 @@ } zinit = TRUE; - tmpFile = fopen("dump.bin", "wb"); - // Initialize compression streams zret = Z_OK; while (!feof(inFile) && zret == Z_OK) @@ -338,7 +336,6 @@ if (zret == Z_OK && zstr.total_out > 0) { outSize += zstr.total_out; - fwrite(outBuffer, sizeof(Uint8), zstr.total_out, tmpFile); if (fwrite(outBuffer, sizeof(Uint8), zstr.total_out, pack->file) != zstr.total_out) { ret = DMERR_FWRITE; @@ -346,7 +343,6 @@ } } } - fclose(tmpFile); } // Create directory entry