mirror_zfs/lib/libzfs
Toomas Soome 4fd926ab40 libzfs: ignoring unreachable code
We have infinite loop and on certain condition, we exit this loop
and thread with pthread_exit(). But also after this loop,
we have a code to perform pthread_cleanup_pop() and return from the
thread.

The  problem is that modern compilers are able to recognize that we
actually never get to the statements after loop and therefore
it is dead code there.

I think, instead of pthread_exit(), it is better to break out of loop
and let the last statements to work as intended. This is because
we do need to keep pthread_cleanup_pop() anyhow. Of course,
it is matter of taste if we want to use return or pthread_exit as very
last statement in this function.

Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Igor Kozhukhov <igor@dilos.org>
Signed-off-by: Toomas Soome <tsoome@me.com>
Closes #17900
2025-11-12 13:06:15 -08:00
..
os libzfs: ensure all ioctl calls go through lzc_ioctl_fd() 2025-05-21 09:23:23 -07:00
.gitignore Clean up lib dependencies 2020-07-10 14:26:00 -07:00
libzfs_changelist.c SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
libzfs_config.c pool_iter_refresh: don't refresh pools twice 2025-10-21 09:50:43 -07:00
libzfs_crypto.c get_key_material_https: label 'kfdok' defined but not used 2025-11-12 13:05:45 -08:00
libzfs_dataset.c Relax special_small_blocks restrictions 2025-07-02 11:11:37 -07:00
libzfs_diff.c Prefer VERIFY0(n) over VERIFY(n == 0) 2025-08-07 11:40:59 -07:00
libzfs_impl.h SPDX: license tags: CDDL-1.0 2025-03-13 17:56:27 -07:00
libzfs_import.c Prefer VERIFY0(n) over VERIFY(n == 0) 2025-08-07 11:40:59 -07:00
libzfs_iter.c Sort the blocking snapshots list #12751 (#17264) 2025-05-01 17:40:23 -07:00
libzfs_mount.c Prefer VERIFY0(n) over VERIFY(n == 0) 2025-08-07 11:40:59 -07:00
libzfs_pool.c Detect a slow raidz child during reads 2025-09-10 15:31:30 -07:00
libzfs_sendrecv.c libzfs: ignoring unreachable code 2025-11-12 13:06:15 -08:00
libzfs_status.c Suppress some ashift warnings 2025-10-21 09:50:43 -07:00
libzfs_util.c Detect a slow raidz child during reads 2025-09-10 15:31:30 -07:00
libzfs.abi pool_iter_refresh: don't refresh pools twice 2025-10-21 09:50:43 -07:00
libzfs.pc.in Spruce up pkg-config files for libzfs/libzfs_core 2020-09-04 11:11:18 -07:00
libzfs.suppr Library ABI tracking with abigail 2020-11-17 09:18:52 -08:00
Makefile.am Bump SONAME of libzfs and libzpool 2024-10-06 14:49:33 -07:00
THIRDPARTYLICENSE.openssl Fix typos in lib/ 2019-09-02 17:53:27 -07:00
THIRDPARTYLICENSE.openssl.descrip Encryption patch follow-up 2017-10-11 16:54:48 -04:00