summaryrefslogtreecommitdiffstats
path: root/generic/tkImgPNG.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2018-09-06 12:40:33 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2018-09-06 12:40:33 (GMT)
commitd67e8884b9badf3e67f54551506d5e85d711f919 (patch)
treef4d4e73faf860ff958f0da9424b33979940ce3bc /generic/tkImgPNG.c
parent00693b0bd778d46d986a05e630c0d0c0fbb63992 (diff)
downloadtk-d67e8884b9badf3e67f54551506d5e85d711f919.zip
tk-d67e8884b9badf3e67f54551506d5e85d711f919.tar.gz
tk-d67e8884b9badf3e67f54551506d5e85d711f919.tar.bz2
Use TCL_IO_FAILURE, for more readable TIP #494 compatibility.
Diffstat (limited to 'generic/tkImgPNG.c')
-rw-r--r--generic/tkImgPNG.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/generic/tkImgPNG.c b/generic/tkImgPNG.c
index 745f93e..a620515 100644
--- a/generic/tkImgPNG.c
+++ b/generic/tkImgPNG.c
@@ -2885,7 +2885,7 @@ WriteData(
}
memcpy(destPtr+objSz, srcPtr, srcSz);
- } else if ((size_t)Tcl_Write(pngPtr->channel, (const char *) srcPtr, srcSz) == (size_t)-1) {
+ } else if (Tcl_Write(pngPtr->channel, (const char *) srcPtr, srcSz) == TCL_IO_FAILURE) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"write to channel failed: %s", Tcl_PosixError(interp)));
return TCL_ERROR;