[LIBTIFF] Update to version 4.1.0. CORE-16550
[reactos.git] / dll / 3rdparty / libtiff / tif_tile.c
index 36a0000..77126af 100644 (file)
@@ -27,7 +27,6 @@
  *
  * Tiled Image Support Routines.
  */
-
 #include <precomp.h>
 
 /*
@@ -182,15 +181,8 @@ TIFFTileRowSize(TIFF* tif)
 {
        static const char module[] = "TIFFTileRowSize";
        uint64 m;
-       tmsize_t n;
        m=TIFFTileRowSize64(tif);
-       n=(tmsize_t)m;
-       if ((uint64)n!=m)
-       {
-               TIFFErrorExt(tif->tif_clientdata,module,"Integer overflow");
-               n=0;
-       }
-       return(n);
+       return _TIFFCastUInt64ToSSize(tif, m, module);
 }
 
 /*
@@ -249,15 +241,8 @@ TIFFVTileSize(TIFF* tif, uint32 nrows)
 {
        static const char module[] = "TIFFVTileSize";
        uint64 m;
-       tmsize_t n;
        m=TIFFVTileSize64(tif,nrows);
-       n=(tmsize_t)m;
-       if ((uint64)n!=m)
-       {
-               TIFFErrorExt(tif->tif_clientdata,module,"Integer overflow");
-               n=0;
-       }
-       return(n);
+       return _TIFFCastUInt64ToSSize(tif, m, module);
 }
 
 /*
@@ -273,15 +258,8 @@ TIFFTileSize(TIFF* tif)
 {
        static const char module[] = "TIFFTileSize";
        uint64 m;
-       tmsize_t n;
        m=TIFFTileSize64(tif);
-       n=(tmsize_t)m;
-       if ((uint64)n!=m)
-       {
-               TIFFErrorExt(tif->tif_clientdata,module,"Integer overflow");
-               n=0;
-       }
-       return(n);
+       return _TIFFCastUInt64ToSSize(tif, m, module);
 }
 
 /*