]> git.proxmox.com Git - mirror_zfs.git/commit
libnvpair.c: replace strstr() with strchr() for a single character
authorrilysh <nightquick@proton.me>
Mon, 29 Jan 2024 17:46:13 +0000 (23:16 +0530)
committerGitHub <noreply@github.com>
Mon, 29 Jan 2024 17:46:13 +0000 (09:46 -0800)
commit0cbf135293b07f821ff427de62e01e6f113bde98
tree9540cd97e30e81cbd9841e80e59240dd1070c557
parentc3fd7a52173c9572ad605961a3ac64b9d0129059
libnvpair.c: replace strstr() with strchr() for a single character

Since we're looking for a single new-line character in the haystack,
it's better (and slightly more efficient) to use strchr() instead of
strstr().

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Signed-off-by: rilysh <nightquick@proton.me>
Closes #15798
lib/libnvpair/libnvpair.c