nvpair: Fix operator precedence

59dc88602e made a mistake when doing a
check, which can cause us to continue processing when we should return
EFAULT.

Reported-by: Grok 4.5 Build Beta
Reviewed-by: Alexander Motin <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Richard Yao <[email protected]>
Closes #18874
This commit is contained in:
Richard Yao authored and GitHub committed 2026-08-04 16:44:46 -07:00
1 parent bd336d300f
commit 7312322b56
1 file changed
+1 -1
+1 -1
View File
@@ -3358,7 +3358,7 @@ nvs_xdr_nvp_op(nvstream_t *nvs, nvpair_t *nvp)
* In case of data types DATA_TYPE_STRING and DATA_TYPE_STRING_ARRAY
* is the size of the string(s) excluded.
*/
if ((value_sz = i_get_value_size(type, NULL, nelem, NVP_SIZE(nvp)) < 0))
if ((value_sz = i_get_value_size(type, NULL, nelem, NVP_SIZE(nvp))) < 0)
return (EFAULT);
/* if there is no data to extract then return */