mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Use SET_ERROR for constant non-zero return codes
Update many return and assignment statements to follow the convention of using the SET_ERROR macro when returning a hard-coded non-zero value from a function. This aids debugging by recording the error codes in the debug log. Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed by: Matthew Ahrens <mahrens@delphix.com> Signed-off-by: Ned Bass <bass6@llnl.gov> Closes #6441
This commit is contained in:
committed by
Brian Behlendorf
parent
6710381680
commit
ecb2b7dc7f
@@ -589,7 +589,7 @@ zap_entry_create(zap_leaf_t *l, zap_name_t *zn, uint32_t cd,
|
||||
numchunks = 1 + ZAP_LEAF_ARRAY_NCHUNKS(zn->zn_key_orig_numints *
|
||||
zn->zn_key_intlen) + ZAP_LEAF_ARRAY_NCHUNKS(valuelen);
|
||||
if (numchunks > ZAP_LEAF_NUMCHUNKS(l))
|
||||
return (E2BIG);
|
||||
return (SET_ERROR(E2BIG));
|
||||
|
||||
if (cd == ZAP_NEED_CD) {
|
||||
/* find the lowest unused cd */
|
||||
|
||||
Reference in New Issue
Block a user