diff options
author | Colm <[email protected]> | 2021-06-03 16:13:42 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-06-03 09:13:42 -0600 |
commit | f97142c74801a15c4e3840722502d279d1913fb5 (patch) | |
tree | 1600e7ef3e8f19a763fe3807c2042604dce792d8 /lib/libzfs/libzfs.suppr | |
parent | f645d4416f0f0ddb46ba85bbaaf3bb7e87f75877 (diff) |
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 <[email protected]>
Reviewed-by: John Kennedy <[email protected]>
Signed-off-by: Colm Buckley <[email protected]>
Closes #12156
Diffstat (limited to 'lib/libzfs/libzfs.suppr')
0 files changed, 0 insertions, 0 deletions