diff options
author | Bob Friesenhahn <bfriesen@simple.dallas.tx.us> | 2013-12-17 14:45:12 +0000 |
---|---|---|
committer | Bob Friesenhahn <bfriesen@simple.dallas.tx.us> | 2013-12-17 14:45:12 +0000 |
commit | ad7821c46206f1c74125ac08df2fad115d682847 (patch) | |
tree | c5fdd5d0ea65ad8e0a563120688741c133883df8 | |
parent | 45a4c455450066cec0c48b766ddcb85d75f13f51 (diff) | |
download | libtiff-git-ad7821c46206f1c74125ac08df2fad115d682847.tar.gz |
Check return status from TIFFWriteScanline() correctly in test programs.branch-3.9
-rw-r--r-- | test/ascii_tag.c | 4 | ||||
-rw-r--r-- | test/long_tag.c | 4 | ||||
-rw-r--r-- | test/short_tag.c | 4 | ||||
-rw-r--r-- | test/strip.c | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/test/ascii_tag.c b/test/ascii_tag.c index bf812126..fc37e785 100644 --- a/test/ascii_tag.c +++ b/test/ascii_tag.c @@ -1,4 +1,4 @@ -/* $Id: ascii_tag.c,v 1.5.2.1 2010-06-08 18:50:43 bfriesen Exp $ */ +/* $Id: ascii_tag.c,v 1.5.2.2 2013-12-17 14:45:12 bfriesen Exp $ */ /* * Copyright (c) 2004, Andrey Kiselev <dron@ak4719.spb.edu> @@ -125,7 +125,7 @@ main(int argc, char **argv) } /* Write dummy pixel data. */ - if (!TIFFWriteScanline(tif, buf, 0, 0) < 0) { + if (TIFFWriteScanline(tif, buf, 0, 0) == -1) { fprintf (stderr, "Can't write image data.\n"); goto failure; } diff --git a/test/long_tag.c b/test/long_tag.c index 256bc8e9..3338f22e 100644 --- a/test/long_tag.c +++ b/test/long_tag.c @@ -1,4 +1,4 @@ -/* $Id: long_tag.c,v 1.3.2.1 2010-06-08 18:50:43 bfriesen Exp $ */ +/* $Id: long_tag.c,v 1.3.2.2 2013-12-17 14:45:12 bfriesen Exp $ */ /* * Copyright (c) 2004, Andrey Kiselev <dron@ak4719.spb.edu> @@ -109,7 +109,7 @@ main(int argc, char **argv) } /* Write dummy pixel data. */ - if (!TIFFWriteScanline(tif, buf, 0, 0) < 0) { + if (TIFFWriteScanline(tif, buf, 0, 0) == -1) { fprintf (stderr, "Can't write image data.\n"); goto failure; } diff --git a/test/short_tag.c b/test/short_tag.c index 45214e1d..1968980c 100644 --- a/test/short_tag.c +++ b/test/short_tag.c @@ -1,4 +1,4 @@ -/* $Id: short_tag.c,v 1.6.2.2 2010-06-10 22:52:45 bfriesen Exp $ */ +/* $Id: short_tag.c,v 1.6.2.3 2013-12-17 14:45:12 bfriesen Exp $ */ /* * Copyright (c) 2004, Andrey Kiselev <dron@ak4719.spb.edu> @@ -123,7 +123,7 @@ main(int argc, char **argv) } /* Write dummy pixel data. */ - if (!TIFFWriteScanline(tif, buf, 0, 0) < 0) { + if (TIFFWriteScanline(tif, buf, 0, 0) == -1) { fprintf (stderr, "Can't write image data.\n"); goto failure; } diff --git a/test/strip.c b/test/strip.c index df6406e0..c8326401 100644 --- a/test/strip.c +++ b/test/strip.c @@ -1,4 +1,4 @@ -/* $Id: strip.c,v 1.3.2.2 2010-06-08 18:50:43 bfriesen Exp $ */ +/* $Id: strip.c,v 1.3.2.3 2013-12-17 14:45:12 bfriesen Exp $ */ /* * Copyright (c) 2004, Andrey Kiselev <dron@ak4719.spb.edu> @@ -278,7 +278,7 @@ write_scanlines(TIFF *tif, const tdata_t array, const tsize_t size) } for (offset = 0, row = 0; row < length; offset+=scanlinesize, row++) { - if (TIFFWriteScanline(tif, (char *)array + offset, row, 0) < 0) { + if (TIFFWriteScanline(tif, (char *)array + offset, row, 0) == -1) { fprintf (stderr, "Can't write image data at row %u.\n", row); return -1; |