aboutsummaryrefslogtreecommitdiff
path: root/vendor/golang.org/x/net/ipv4/header.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/golang.org/x/net/ipv4/header.go')
-rw-r--r--vendor/golang.org/x/net/ipv4/header.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/vendor/golang.org/x/net/ipv4/header.go b/vendor/golang.org/x/net/ipv4/header.go
index 8bb0f0f..358afe2 100644
--- a/vendor/golang.org/x/net/ipv4/header.go
+++ b/vendor/golang.org/x/net/ipv4/header.go
@@ -9,7 +9,6 @@ import (
"fmt"
"net"
"runtime"
- "syscall"
"golang.org/x/net/internal/socket"
)
@@ -54,7 +53,7 @@ func (h *Header) String() string {
// Marshal returns the binary encoding of h.
func (h *Header) Marshal() ([]byte, error) {
if h == nil {
- return nil, syscall.EINVAL
+ return nil, errInvalidConn
}
if h.Len < HeaderLen {
return nil, errHeaderTooShort
@@ -98,7 +97,7 @@ func (h *Header) Marshal() ([]byte, error) {
return b, nil
}
-// Parse parses b as an IPv4 header and sotres the result in h.
+// Parse parses b as an IPv4 header and stores the result in h.
func (h *Header) Parse(b []byte) error {
if h == nil || len(b) < HeaderLen {
return errHeaderTooShort