diff options
author | Julian Smith <jules@op59.net> | 2020-01-08 12:41:57 +0000 |
---|---|---|
committer | Julian Smith <jules@op59.net> | 2020-01-08 14:53:19 +0000 |
commit | 4e4edd2161b4b7f3ccb23a90a8ca90dccffd078c (patch) | |
tree | 3a67bd5347c62f8a1acf05c1b18cef357c4dc232 /contrib | |
parent | cef68e9a0ca0be10f08e415785f8b8fac37d7828 (diff) | |
download | ghostpdl-4e4edd2161b4b7f3ccb23a90a8ca90dccffd078c.tar.gz |
Coverity 94757: avoid 'if (foo) return code; return code;' construct.
This code is slightly odd, and didn't want to make major changes, so have ended
up with odd-looking extended expression whose actual value we ignore.
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/gdevbjc_.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/contrib/gdevbjc_.c b/contrib/gdevbjc_.c index 2c37650b3..a661ba0d1 100644 --- a/contrib/gdevbjc_.c +++ b/contrib/gdevbjc_.c @@ -390,8 +390,9 @@ gdev_bjc_get_params(gx_device * pdev, gs_param_list * plist) { const gx_device_bjc_printer * ppdev = (gx_device_bjc_printer *)pdev; - int code = gdev_prn_get_params(pdev, plist); - if (code < 0 || + int code; + (void) ( + (code = gdev_prn_get_params(pdev, plist)) < 0 || (code = param_write_string(plist, "PrinterType", ¶mValueToParam(strPrinterType, ppdev->printerType)->p_string)) < 0 || (code = param_write_string(plist, "Feeder", @@ -417,8 +418,8 @@ gdev_bjc_get_params(gx_device * pdev, gs_param_list * plist) (code = param_write_float(plist, "Gamma", &ppdev->gamma)) < 0 || (code = param_write_float(plist, "RedGamma", &ppdev->redGamma)) < 0 || (code = param_write_float(plist, "GreenGamma", &ppdev->greenGamma)) < 0 || - (code = param_write_float(plist, "BlueGamma", &ppdev->blueGamma)) < 0) - return code; + (code = param_write_float(plist, "BlueGamma", &ppdev->blueGamma)) < 0 + ); return code; } |