aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rozman <simon@rozman.si>2019-04-12 13:51:33 +0200
committerSimon Rozman <simon@rozman.si>2019-04-12 15:35:39 +0200
commit4c47c2fbbf0483dba9e8be441629c33797281ba0 (patch)
treea2df07cb08ef6ebe195178000d4614abe09b9dbd
parent.gitignore Static Driver Verifier output (diff)
downloadwintun-4c47c2fbbf0483dba9e8be441629c33797281ba0.tar.xz
wintun-4c47c2fbbf0483dba9e8be441629c33797281ba0.zip
TunCanFitIntoIrp => TunWontFitIntoIrp
The function name was inverted and misleading. Signed-off-by: Simon Rozman <simon@rozman.si>
-rw-r--r--wintun.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/wintun.c b/wintun.c
index 24b622a..20bff09 100644
--- a/wintun.c
+++ b/wintun.c
@@ -322,7 +322,7 @@ retry:
}
_IRQL_requires_same_
-static BOOLEAN TunCanFitIntoIrp(_In_ IRP *Irp, _In_ ULONG size, _In_ NET_BUFFER *nb)
+static BOOLEAN TunWontFitIntoIrp(_In_ IRP *Irp, _In_ ULONG size, _In_ NET_BUFFER *nb)
{
return (ULONG_PTR)size < Irp->IoStatus.Information + TunPacketAlign(sizeof(TUN_PACKET) + NET_BUFFER_DATA_LENGTH(nb));
}
@@ -531,7 +531,7 @@ static void TunQueueProcess(_Inout_ TUN_CTX *ctx)
nb = TunQueueRemove(ctx, &nbl);
/* If the NB won't fit in the IRP, return it. */
- if (nb && TunCanFitIntoIrp(irp, size, nb)) {
+ if (nb && TunWontFitIntoIrp(irp, size, nb)) {
TunQueuePrepend(ctx, nb, nbl);
if (nbl)
TunNBLRefDec(ctx, nbl, NDIS_SEND_COMPLETE_FLAGS_DISPATCH_LEVEL);