diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2022-05-13 13:49:57 -0500 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2022-05-14 11:12:31 -0500 |
| commit | 7d56566b7c51c49ded526466dfae6af9e1709040 (patch) | |
| tree | bda62f4cdd8c7318542d8f0ed20901cb41e1a271 /src/api/burn/bextutil | |
| parent | 031991f32f059b64374e6d257cbe573304dd577f (diff) | |
| download | wix-7d56566b7c51c49ded526466dfae6af9e1709040.tar.gz wix-7d56566b7c51c49ded526466dfae6af9e1709040.tar.bz2 wix-7d56566b7c51c49ded526466dfae6af9e1709040.zip | |
Update balutil and Bal.wixext to use more concise Exit* macros.
Diffstat (limited to 'src/api/burn/bextutil')
| -rw-r--r-- | src/api/burn/bextutil/bextutil.cpp | 2 | ||||
| -rw-r--r-- | src/api/burn/bextutil/inc/bextutil.h | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/api/burn/bextutil/bextutil.cpp b/src/api/burn/bextutil/bextutil.cpp index 4b22d502..b2e689c3 100644 --- a/src/api/burn/bextutil/bextutil.cpp +++ b/src/api/burn/bextutil/bextutil.cpp | |||
| @@ -85,7 +85,7 @@ DAPI_(HRESULT) BextGetBundleExtensionDataNode( | |||
| 85 | 85 | ||
| 86 | // @Id | 86 | // @Id |
| 87 | hr = XmlGetAttributeEx(pixnNode, L"Id", &sczId); | 87 | hr = XmlGetAttributeEx(pixnNode, L"Id", &sczId); |
| 88 | ExitOnFailure(hr, "Failed to get @Id."); | 88 | ExitOnRequiredXmlQueryFailure(hr, "Failed to get @Id."); |
| 89 | 89 | ||
| 90 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczId, -1, wzExtensionId, -1)) | 90 | if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczId, -1, wzExtensionId, -1)) |
| 91 | { | 91 | { |
diff --git a/src/api/burn/bextutil/inc/bextutil.h b/src/api/burn/bextutil/inc/bextutil.h index facaf2e8..e3edff01 100644 --- a/src/api/burn/bextutil/inc/bextutil.h +++ b/src/api/burn/bextutil/inc/bextutil.h | |||
| @@ -16,6 +16,8 @@ extern "C" { | |||
| 16 | #define BextExitOnNullSource(d, p, x, e, f, ...) if (NULL == p) { x = e; BextLogError(x, f, __VA_ARGS__); ExitTraceSource(d, x, f, __VA_ARGS__); goto LExit; } | 16 | #define BextExitOnNullSource(d, p, x, e, f, ...) if (NULL == p) { x = e; BextLogError(x, f, __VA_ARGS__); ExitTraceSource(d, x, f, __VA_ARGS__); goto LExit; } |
| 17 | #define BextExitOnNullWithLastErrorSource(d, p, x, f, ...) if (NULL == p) { DWORD Dutil_er = ::GetLastError(); x = HRESULT_FROM_WIN32(Dutil_er); if (!FAILED(x)) { x = E_FAIL; } BextLogError(x, f, __VA_ARGS__); ExitTraceSource(d, x, f, __VA_ARGS__); goto LExit; } | 17 | #define BextExitOnNullWithLastErrorSource(d, p, x, f, ...) if (NULL == p) { DWORD Dutil_er = ::GetLastError(); x = HRESULT_FROM_WIN32(Dutil_er); if (!FAILED(x)) { x = E_FAIL; } BextLogError(x, f, __VA_ARGS__); ExitTraceSource(d, x, f, __VA_ARGS__); goto LExit; } |
| 18 | #define BextExitWithLastErrorSource(d, x, f, ...) { DWORD Dutil_er = ::GetLastError(); x = HRESULT_FROM_WIN32(Dutil_er); if (!FAILED(x)) { x = E_FAIL; } BextLogError(x, f, __VA_ARGS__); ExitTraceSource(d, x, f, __VA_ARGS__); goto LExit; } | 18 | #define BextExitWithLastErrorSource(d, x, f, ...) { DWORD Dutil_er = ::GetLastError(); x = HRESULT_FROM_WIN32(Dutil_er); if (!FAILED(x)) { x = E_FAIL; } BextLogError(x, f, __VA_ARGS__); ExitTraceSource(d, x, f, __VA_ARGS__); goto LExit; } |
| 19 | #define BextExitOnOptionalXmlQueryFailureSource(d, x, b, f, ...) { { if (S_FALSE == x || E_NOTFOUND == x) { b = FALSE; x = S_OK; } else { b = SUCCEEDED(x); } }; BextExitOnRootFailureSource(d, x, f, __VA_ARGS__); } | ||
| 20 | #define BextExitOnRequiredXmlQueryFailureSource(d, x, f, ...) { if (S_FALSE == x) { x = E_NOTFOUND; } BextExitOnRootFailureSource(d, x, f, __VA_ARGS__); } | ||
| 19 | 21 | ||
| 20 | #define BextExitOnFailure(x, f, ...) BextExitOnFailureSource(DUTIL_SOURCE_DEFAULT, x, f, __VA_ARGS__) | 22 | #define BextExitOnFailure(x, f, ...) BextExitOnFailureSource(DUTIL_SOURCE_DEFAULT, x, f, __VA_ARGS__) |
| 21 | #define BextExitOnRootFailure(x, f, ...) BextExitOnRootFailureSource(DUTIL_SOURCE_DEFAULT, x, f, __VA_ARGS__) | 23 | #define BextExitOnRootFailure(x, f, ...) BextExitOnRootFailureSource(DUTIL_SOURCE_DEFAULT, x, f, __VA_ARGS__) |
| @@ -24,6 +26,8 @@ extern "C" { | |||
| 24 | #define BextExitOnNull(p, x, e, f, ...) BextExitOnNullSource(DUTIL_SOURCE_DEFAULT, p, x, e, f, __VA_ARGS__) | 26 | #define BextExitOnNull(p, x, e, f, ...) BextExitOnNullSource(DUTIL_SOURCE_DEFAULT, p, x, e, f, __VA_ARGS__) |
| 25 | #define BextExitOnNullWithLastError(p, x, f, ...) BextExitOnNullWithLastErrorSource(DUTIL_SOURCE_DEFAULT, p, x, f, __VA_ARGS__) | 27 | #define BextExitOnNullWithLastError(p, x, f, ...) BextExitOnNullWithLastErrorSource(DUTIL_SOURCE_DEFAULT, p, x, f, __VA_ARGS__) |
| 26 | #define BextExitWithLastError(x, f, ...) BextExitWithLastErrorSource(DUTIL_SOURCE_DEFAULT, x, f, __VA_ARGS__) | 28 | #define BextExitWithLastError(x, f, ...) BextExitWithLastErrorSource(DUTIL_SOURCE_DEFAULT, x, f, __VA_ARGS__) |
| 29 | #define BextExitOnOptionalXmlQueryFailure(x, b, f, ...) BextExitOnOptionalXmlQueryFailureSource(DUTIL_SOURCE_DEFAULT, x, b, f, __VA_ARGS__) | ||
| 30 | #define BextExitOnRequiredXmlQueryFailure(x, f, ...) BextExitOnRequiredXmlQueryFailureSource(DUTIL_SOURCE_DEFAULT, x, f, __VA_ARGS__) | ||
| 27 | 31 | ||
| 28 | const LPCWSTR BUNDLE_EXTENSION_MANIFEST_FILENAME = L"BundleExtensionData.xml"; | 32 | const LPCWSTR BUNDLE_EXTENSION_MANIFEST_FILENAME = L"BundleExtensionData.xml"; |
| 29 | 33 | ||
