mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-24 17:44:17 +01:00
zfs: Use a statement expression to implement SET_ERROR()
This way we can avoid making assumptions about the SDT probe implementation. No functional change intended. This was submitted upstream as https://github.com/openzfs/zfs/pull/16284 MFC after: 1 week
This commit is contained in:
parent
bc2901144c
commit
e5a7890dc0
@ -31,13 +31,14 @@
|
||||
|
||||
#include_next <sys/sdt.h>
|
||||
#ifdef KDTRACE_HOOKS
|
||||
/* CSTYLED */
|
||||
/* BEGIN CSTYLED */
|
||||
SDT_PROBE_DECLARE(sdt, , , set__error);
|
||||
|
||||
#define SET_ERROR(err) \
|
||||
((sdt_sdt___set__error->id ? \
|
||||
(*sdt_probe_func)(sdt_sdt___set__error->id, \
|
||||
(uintptr_t)err, 0, 0, 0, 0) : 0), err)
|
||||
#define SET_ERROR(err) ({ \
|
||||
SDT_PROBE1(sdt, , , set__error, (uintptr_t)err); \
|
||||
err; \
|
||||
})
|
||||
/* END CSTYLED */
|
||||
#else
|
||||
#define SET_ERROR(err) (err)
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user