Cleanup: Remove branches that always evaluate the same way

Coverity reported that the ASSERT in taskq_create() is always true and
the `*offp > MAXOFFSET_T` check in zfs_file_seek() is always false.

We delete them as cleanup.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Closes #14130
This commit is contained in:
Richard Yao 2022-11-03 13:47:48 -04:00 committed by GitHub
parent 1e1ce10e55
commit 11e3416ae7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 2 deletions

View File

@ -1048,7 +1048,6 @@ taskq_create(const char *name, int threads_arg, pri_t pri,
ASSERT(name != NULL);
ASSERT(minalloc >= 0);
ASSERT(maxalloc <= INT_MAX);
ASSERT(!(flags & (TASKQ_CPR_SAFE))); /* Unsupported */
/* Scale the number of threads using nthreads as a percentage */

View File

@ -246,7 +246,7 @@ zfs_file_seek(zfs_file_t *fp, loff_t *offp, int whence)
{
loff_t rc;
if (*offp < 0 || *offp > MAXOFFSET_T)
if (*offp < 0)
return (EINVAL);
rc = vfs_llseek(fp, *offp, whence);