Mercurial > hg > dmlib
comparison tools/lib64fmts.c @ 2186:dc8a443accdf
Simplify fmtDrazLaceGetLaceType() as the buffer can't be NULL.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 12 Jun 2019 21:30:58 +0300 |
parents | 6ba6ca5632d2 |
children | ec47c60d26e2 |
comparison
equal
deleted
inserted
replaced
2185:6ba6ca5632d2 | 2186:dc8a443accdf |
---|---|
393 static int fmtDrazLaceGetLaceType(const DMC64EncDecOp *op, DMC64Image *img, | 393 static int fmtDrazLaceGetLaceType(const DMC64EncDecOp *op, DMC64Image *img, |
394 const DMGrowBuf *buf, const DMC64ImageCommonFormat *fmt) | 394 const DMGrowBuf *buf, const DMC64ImageCommonFormat *fmt) |
395 { | 395 { |
396 (void) fmt; | 396 (void) fmt; |
397 | 397 |
398 if (buf != NULL) | 398 img->laceType = buf->data[op->offs] ? D64_ILACE_RES : D64_ILACE_COLOR; |
399 img->laceType = buf->data[op->offs] ? D64_ILACE_RES : D64_ILACE_COLOR; | |
400 else | |
401 img->laceType = D64_ILACE_RES; | |
402 | |
403 return DMERR_OK; | 399 return DMERR_OK; |
404 } | 400 } |
405 | 401 |
406 | 402 |
407 static int fmtDrazLaceSetLaceType(const DMC64EncDecOp *op, DMGrowBuf *buf, | 403 static int fmtDrazLaceSetLaceType(const DMC64EncDecOp *op, DMGrowBuf *buf, |