diff options
author | Robin Watts <Robin.Watts@artifex.com> | 2022-03-08 12:08:28 +0000 |
---|---|---|
committer | Chris Liddell <chris.liddell@artifex.com> | 2022-03-08 17:49:36 +0000 |
commit | 6a71846b7f118df36f01aed6d97a665b47409d90 (patch) | |
tree | bdf7d9bbea5d5a35ae72987b03e8c481257bf764 | |
parent | ea9bd8313cc11cb3ff1ee0721c0384f5b5af1fee (diff) | |
download | ghostpdl-6a71846b7f118df36f01aed6d97a665b47409d90.tar.gz |
Coverity 376618: Squash warning about identical cases of if.
Also, ensure that we test for error return codes.
-rw-r--r-- | devices/gdevtsep.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/devices/gdevtsep.c b/devices/gdevtsep.c index 52a15708e..fd859ddcc 100644 --- a/devices/gdevtsep.c +++ b/devices/gdevtsep.c @@ -1599,6 +1599,8 @@ tiffsep_prn_open(gx_device * pdev) tiff_set_handlers(); code = dev_proc(pdev, get_profile)((gx_device *)pdev, &profile_struct); + if (code < 0) + return code; /* For the planar device we need to set up the bit depth of each plane. For other devices this is handled in check_device_separable where @@ -1671,6 +1673,8 @@ tiffsep_prn_open(gx_device * pdev) pdev_sep->devn_params.bitspercomponent; pdev->color_info.separable_and_linear = GX_CINFO_SEP_LIN; code = gdev_prn_open_planar(pdev, true); + if (code < 0) + return code; while (pdev->child) pdev = pdev->child; ppdev = (gx_device_printer *)pdev; @@ -1680,11 +1684,8 @@ tiffsep_prn_open(gx_device * pdev) /* Set up the icc link settings at this time. Only CMYK post render profiles are allowed */ - code = gx_downscaler_create_post_render_link((gx_device *)pdev, + return gx_downscaler_create_post_render_link((gx_device *)pdev, &pdev_sep->icclink); - if (code < 0) - return code; - return code; } static int |