]> git.ipfire.org Git - thirdparty/wireguard-go.git/commitdiff
tun/netstack: remove usage of pkt.IsNil()
authorJason A. Donenfeld <Jason@zx2c4.com>
Sun, 4 May 2025 15:54:57 +0000 (17:54 +0200)
committerJason A. Donenfeld <Jason@zx2c4.com>
Mon, 5 May 2025 13:05:35 +0000 (15:05 +0200)
Since 3c75945fd ("netstack: remove PacketBuffer.IsNil()") this has been
invalid. Follow the replacement pattern of that commit.

The old definition inlined to the same code anyway:

 func (pk *PacketBuffer) IsNil() bool {
  return pk == nil
 }

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
tun/netstack/tun.go

index 7279cd9dbdca754f45944d9703c9fc3f391d9ee1..04f6986f6c2f361ddb072deb8c16f81bc4ac4480 100644 (file)
@@ -155,7 +155,7 @@ func (tun *netTun) Write(buf [][]byte, offset int) (int, error) {
 
 func (tun *netTun) WriteNotify() {
        pkt := tun.ep.Read()
-       if pkt.IsNil() {
+       if pkt == nil {
                return
        }