From 4c47c2fbbf0483dba9e8be441629c33797281ba0 Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Fri, 12 Apr 2019 13:51:33 +0200 Subject: [PATCH] TunCanFitIntoIrp => TunWontFitIntoIrp The function name was inverted and misleading. Signed-off-by: Simon Rozman --- wintun.c | 4 ++-- 1 file 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);