Skip to content

Commit d0d89af

Browse files
fix: load and unload command were returning non-zero status code on success
1 parent be4fa76 commit d0d89af

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

.clang-format

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
Language: Cpp
2+
Language: C
33
BasedOnStyle: Microsoft
44
AccessModifierOffset: -4
55
AlignAfterOpenBracket: BlockIndent

src/Modules.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ HRESULT Load(const char *modulePath)
208208

209209
LogSuccess("%s has been loaded.", modulePath);
210210

211-
return hr;
211+
return S_OK;
212212
}
213213

214214
HRESULT Unload(const char *modulePath)
@@ -266,7 +266,7 @@ HRESULT Unload(const char *modulePath)
266266

267267
LogSuccess("%s has been unloaded.", modulePath);
268268

269-
return hr;
269+
return S_OK;
270270
}
271271

272272
HRESULT UnloadThenLoad(const char *modulePath)
@@ -290,5 +290,5 @@ HRESULT UnloadThenLoad(const char *modulePath)
290290
if (FAILED(hr))
291291
return E_FAIL;
292292

293-
return hr;
293+
return S_OK;
294294
}

src/XDRPC.c

+1-3
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,10 @@ HRESULT XdrpcCall(const char *moduleName, uint32_t ordinal, XdrpcArgInfo *args,
9494

9595
// Increase the size of the buffer to allow all arguments to fit
9696
for (i = 0; i < numberOfArgs; i++)
97-
{
9897
if (args[i].Type == XdrpcArgType_String)
9998
bufferSize += SizeOfString(args[i].pData);
10099
else if (args[i].Type == XdrpcArgType_Integer)
101100
bufferSize += sizeof(uint64_t);
102-
}
103101

104102
// Increase the size of the buffer to fit the module name
105103
bufferSize += moduleNameSize;
@@ -253,7 +251,7 @@ HRESULT XdrpcCall(const char *moduleName, uint32_t ordinal, XdrpcArgInfo *args,
253251
// Close the XBDM connection
254252
DmCloseConnection(connection);
255253

256-
return hr;
254+
return S_OK;
257255
}
258256

259257
// ----------------------------------------------------------------

0 commit comments

Comments
 (0)