From: Jo Sutton Date: Mon, 12 Feb 2024 22:52:06 +0000 (+1300) Subject: s4:dsdb: Add dsdb_werror() macro X-Git-Tag: tdb-1.4.11~1723 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=002e01963d93c9e9c2b5f5392d07ba3eed215012;p=thirdparty%2Fsamba.git s4:dsdb: Add dsdb_werror() macro This works like dsdb_module_werror(), but does not require an ldb module to work. Signed-off-by: Jo Sutton Reviewed-by: Andrew Bartlett --- diff --git a/source4/dsdb/common/util.h b/source4/dsdb/common/util.h index 69a88b8b2a0..78adb91a37c 100644 --- a/source4/dsdb/common/util.h +++ b/source4/dsdb/common/util.h @@ -87,6 +87,9 @@ int dsdb_werror_at(struct ldb_context *ldb, int ldb_ecode, WERROR werr, const char *location, const char *func, const char *reason); +#define dsdb_werror(ldb, ldb_ecode, werr, reason) \ + dsdb_werror_at(ldb, ldb_ecode, werr, __location__, __func__, reason) + #define dsdb_module_werror(module, ldb_ecode, werr, reason) \ dsdb_werror_at(ldb_module_get_ctx(module), ldb_ecode, werr, \ __location__, __func__, reason)