diff options
author | Ken Sharp <ken.sharp@artifex.com> | 2016-05-31 15:28:48 +0100 |
---|---|---|
committer | Ken Sharp <ken.sharp@artifex.com> | 2016-05-31 15:28:48 +0100 |
commit | 04b455ea5a59866f4955f07c295c6fd955ea9a7f (patch) | |
tree | c6dc7564a229a04f999f592e8257d64404b88e2f | |
parent | 5a7a7f4ed4effb576368c7b923c4aa95aef0f5b4 (diff) | |
download | ghostpdl-04b455ea5a59866f4955f07c295c6fd955ea9a7f.tar.gz |
Coverity ID 94636 Remove dead code, pointless test and now unused variable
-rw-r--r-- | devices/gdevescp.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/devices/gdevescp.c b/devices/gdevescp.c index b7b73ba69..92a8157c2 100644 --- a/devices/gdevescp.c +++ b/devices/gdevescp.c @@ -119,7 +119,6 @@ escp2_print_page(gx_device_printer *pdev, FILE *prn_stream) byte *out = buf2; int skip, lnum, top, bottom, left, width; - int auto_feed = 1; int count, i; /* @@ -187,14 +186,12 @@ escp2_print_page(gx_device_printer *pdev, FILE *prn_stream) ** to skip past the top margin. */ - if( auto_feed ) { - top = (int)(dev_t_margin(pdev) * pdev->y_pixels_per_inch); - bottom = (int)(pdev->height - - dev_b_margin(pdev) * pdev->y_pixels_per_inch); - } else { - top = 0; - bottom = pdev->height; - } + /* auto_feed was set to 1 and never altered, meaning the test here + * was irrelvant and led to dead code. Removed the code and 'auto_feed'. + */ + top = (int)(dev_t_margin(pdev) * pdev->y_pixels_per_inch); + bottom = (int)(pdev->height - + dev_b_margin(pdev) * pdev->y_pixels_per_inch); /* ** Make left margin and width sit on byte boundaries: |