mirror_zfs/lib
Colm db9048741b A couple of small style cleanups
In `zpool_load_compat()`:

  * initialize `l_features[]` with a loop rather than a static
    initializer.

  * don't redefine system constants; use private names instead

Rationale here:

When an array is initialized using a static {foo}, only the specified
members are initialized to the provided values, the rest are
initialized to zero. While B_FALSE is of course zero, it feels
unsafe to rely on this being true forever, so I'm inclined to sacrifice
a few microseconds of runtime here and initialize using a loop.

When looking for the correct combination of system constants to use
(in open() and mmap()), I prefer to use private constants rather than
redefining system ones; due to the small chance that the system
ones might be referenced later in the file. So rather than defining
O_PATH and MAP_POPULATE, I use distinct constant names.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Signed-off-by: Colm Buckley <colm@tuatha.org>
Closes #12156
2021-06-09 13:05:34 -07:00
..
libavl cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00
libefi cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00
libicp cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00
libnvpair cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00
libshare freebsd/libshare: nfs: make nfs_is_shared() thread-safe 2021-04-19 15:22:58 -07:00
libspl Introduce write-mostly sums 2021-06-09 13:05:34 -07:00
libtpool cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00
libunicode cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00
libuutil lib/: set O_CLOEXEC on all fds 2021-04-14 13:23:07 -07:00
libzfs A couple of small style cleanups 2021-06-09 13:05:34 -07:00
libzfs_core libzfs{,_core}: set O_CLOEXEC on persistent (ZFS_DEV and MNTTAB) fds 2021-04-14 13:23:07 -07:00
libzfsbootenv libzfsbootenv: lzbe_set_boot_device(): don't free undefined pointer 2021-05-10 12:21:31 -07:00
libzpool lib/: set O_CLOEXEC on all fds 2021-04-14 13:23:07 -07:00
libzstd cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00
libzutil Reinstate the old zpool read label logic as a fallback 2021-05-27 22:31:57 -07:00
Makefile.am cppcheck: integrete cppcheck 2021-01-26 16:12:26 -08:00