Mercurial > hg > dmlib
comparison tools/packed.c @ 1167:848a88ce7a57
Use dmMemset().
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 05 Mar 2015 07:37:35 +0200 |
parents | 0194c8a26aa8 |
children | e8c99da451cd |
comparison
equal
deleted
inserted
replaced
1166:f29fa5b6b748 | 1167:848a88ce7a57 |
---|---|
315 | 315 |
316 // Read (and possibly compress) the data | 316 // Read (and possibly compress) the data |
317 if (compress) | 317 if (compress) |
318 { | 318 { |
319 int zret; | 319 int zret; |
320 memset(&zstr, 0, sizeof(zstr)); | 320 dmMemset(&zstr, 0, sizeof(zstr)); |
321 if (deflateInit(&zstr, level) != Z_OK) | 321 if (deflateInit(&zstr, level) != Z_OK) |
322 { | 322 { |
323 ret = DMERR_COMPRESSION; | 323 ret = DMERR_COMPRESSION; |
324 goto out; | 324 goto out; |
325 } | 325 } |
432 } | 432 } |
433 | 433 |
434 // Read and uncompress the data, if needed | 434 // Read and uncompress the data, if needed |
435 if (decompress || (entry->flags & DMF_COMPRESSED) == 0) | 435 if (decompress || (entry->flags & DMF_COMPRESSED) == 0) |
436 { | 436 { |
437 memset(&zstr, 0, sizeof(zstr)); | 437 dmMemset(&zstr, 0, sizeof(zstr)); |
438 if (inflateInit(&zstr) != Z_OK) | 438 if (inflateInit(&zstr) != Z_OK) |
439 { | 439 { |
440 ret = DMERR_COMPRESSION; | 440 ret = DMERR_COMPRESSION; |
441 goto out; | 441 goto out; |
442 } | 442 } |