Don’t duplicate error checks already done in source functions.
diff --git a/lib/zip_fseek.c b/lib/zip_fseek.c index 83d40dd..a16af1a 100644 --- a/lib/zip_fseek.c +++ b/lib/zip_fseek.c
@@ -45,16 +45,6 @@ if (zf->error.zip_err != 0) return -1; - if (whence != SEEK_SET && whence != SEEK_CUR && whence != SEEK_END) { - zip_error_set(&zf->error, ZIP_ER_INVAL, 0); - return -1; - } - - if ((zip_source_supports(zf->src) & ZIP_SOURCE_MAKE_COMMAND_BITMASK(ZIP_SOURCE_SEEK)) == 0) { - zip_error_set(&zf->error, ZIP_ER_OPNOTSUPP, 0); - return -1; - } - if (zip_source_seek(zf->src, offset, whence) < 0) { _zip_error_set_from_source(&zf->error, zf->src); return -1;
diff --git a/lib/zip_ftell.c b/lib/zip_ftell.c index 895ce81..abbf296 100644 --- a/lib/zip_ftell.c +++ b/lib/zip_ftell.c
@@ -46,11 +46,6 @@ if (zf->error.zip_err != 0) return -1; - if ((zip_source_supports(zf->src) & ZIP_SOURCE_MAKE_COMMAND_BITMASK(ZIP_SOURCE_TELL)) == 0) { - zip_error_set(&zf->error, ZIP_ER_OPNOTSUPP, 0); - return -1; - } - res = zip_source_tell(zf->src); if (res < 0) { _zip_error_set_from_source(&zf->error, zf->src);