From aeab3f6cc7d57ff96c82c01578bf75b09cbb5dc2 Mon Sep 17 00:00:00 2001 From: Mark Adler Date: Sat, 22 Feb 2025 23:53:13 -0800 Subject: Clarify the use of errnum in gzerror(). --- zlib.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/zlib.h b/zlib.h index 6adb0bb..e734b66 100644 --- a/zlib.h +++ b/zlib.h @@ -1678,9 +1678,10 @@ ZEXTERN int ZEXPORT gzclose_w(gzFile file); ZEXTERN const char * ZEXPORT gzerror(gzFile file, int *errnum); /* Return the error message for the last error which occurred on file. - errnum is set to zlib error number. If an error occurred in the file system - and not in the compression library, errnum is set to Z_ERRNO and the - application may consult errno to get the exact error code. + If errnum is not NULL, *errnum is set to zlib error number. If an error + occurred in the file system and not in the compression library, *errnum is + set to Z_ERRNO and the application may consult errno to get the exact error + code. The application must not modify the returned string. Future calls to this function may invalidate the previously returned string. If file is -- cgit v1.2.3-55-g6feb