aboutsummaryrefslogtreecommitdiffstats
path: root/api/resource.c
diff options
context:
space:
mode:
authorSimon Rozman <simon@rozman.si>2020-10-15 12:21:55 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2020-10-30 16:51:00 +0100
commit0ad302c11ddae5a8bb6de2c59e908d815f918ab9 (patch)
treea80d3db316ab65a45858d6fa41afd5e928fe2863 /api/resource.c
parentapi: internal reorganization (diff)
downloadwintun-0ad302c11ddae5a8bb6de2c59e908d815f918ab9.tar.xz
wintun-0ad302c11ddae5a8bb6de2c59e908d815f918ab9.zip
api: stop double error status reporting
When an internal function logs an error and its cause, it bloats the log when the caller logs the cause again. Signed-off-by: Simon Rozman <simon@rozman.si>
Diffstat (limited to 'api/resource.c')
-rw-r--r--api/resource.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/api/resource.c b/api/resource.c
index 7b1ea59..e2e5174 100644
--- a/api/resource.c
+++ b/api/resource.c
@@ -58,7 +58,7 @@ ResourceCopyToFile(
DWORD SizeResource;
DWORD Result = ResourceGetAddress(ResourceName, &LockedResource, &SizeResource);
if (Result != ERROR_SUCCESS)
- return LOG_ERROR(L"Failed to locate resource", Result);
+ return LOG(WINTUN_LOG_ERR, L"Failed to locate resource"), Result;
HANDLE DestinationHandle = CreateFileW(
DestinationPath,
GENERIC_WRITE,