aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-07-31 15:26:29 +0000
committerJason A. Donenfeld <Jason@zx2c4.com>2019-08-02 09:43:32 +0000
commit9e9f1ac9b39de4f2f9779c4beb2ed050e091dbef (patch)
treebacd75c0ed22572eb3ca6f9cc0e4e8679314e918
parentDisable APC when taking rwlock (diff)
downloadwintun-9e9f1ac9b39de4f2f9779c4beb2ed050e091dbef.tar.xz
wintun-9e9f1ac9b39de4f2f9779c4beb2ed050e091dbef.zip
Rearrange comment to make clang-format happy
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r--wintun.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/wintun.c b/wintun.c
index c8c1247..4f083f1 100644
--- a/wintun.c
+++ b/wintun.c
@@ -936,6 +936,8 @@ TunInitializeEx(
NdisMGetDeviceProperty(MiniportAdapterHandle, NULL, &Ctx->FunctionalDeviceObject, NULL, NULL, NULL);
if (Status = NDIS_STATUS_FAILURE, !Ctx->FunctionalDeviceObject)
goto cleanupFreeCtx;
+#pragma warning(suppress : 28175)
+ ASSERT(!Ctx->FunctionalDeviceObject->Reserved);
/* Reverse engineering indicates that we'd be better off calling
* NdisWdfGetAdapterContextFromAdapterHandle(functional_device),
* which points to our TUN_CTX object directly, but this isn't
@@ -943,8 +945,6 @@ TunInitializeEx(
* this reserved field. Revisit this when we drop support for old
* Windows versions. */
#pragma warning(suppress : 28175)
- ASSERT(!Ctx->FunctionalDeviceObject->Reserved);
-#pragma warning(suppress : 28175)
Ctx->FunctionalDeviceObject->Reserved = Ctx;
Ctx->Statistics.Header.Type = NDIS_OBJECT_TYPE_DEFAULT;