diff options
author | Ian Lance Taylor <iant@google.com> | 2012-04-22 18:51:44 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2012-04-22 18:51:44 +0000 |
commit | f12e8bd5c3e7063f4e616bda3cab540ea73ac446 (patch) | |
tree | dc74fb1f36cb378bbb8295d9aa9daefe37eff0f2 /libgo/go/syscall | |
parent | 970aa0b9a95103d518c7e96c70794ba32d074368 (diff) | |
download | gcc-f12e8bd5c3e7063f4e616bda3cab540ea73ac446.zip gcc-f12e8bd5c3e7063f4e616bda3cab540ea73ac446.tar.gz gcc-f12e8bd5c3e7063f4e616bda3cab540ea73ac446.tar.bz2 |
godump.c (go_output_typedef): Dump size of structs.
* godump.c (go_output_typedef): Dump size of structs.
mksysinfo, syscall: Change Sizeof names from var to const.
From-SVN: r186678
Diffstat (limited to 'libgo/go/syscall')
-rw-r--r-- | libgo/go/syscall/sockcmsg_unix.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libgo/go/syscall/sockcmsg_unix.go b/libgo/go/syscall/sockcmsg_unix.go index 1faac84..943ebdd 100644 --- a/libgo/go/syscall/sockcmsg_unix.go +++ b/libgo/go/syscall/sockcmsg_unix.go @@ -39,7 +39,7 @@ func CmsgSpace(datalen int) int { } func cmsgData(cmsg *Cmsghdr) unsafe.Pointer { - return unsafe.Pointer(uintptr(unsafe.Pointer(cmsg)) + uintptr(SizeofCmsghdr)) + return unsafe.Pointer(uintptr(unsafe.Pointer(cmsg)) + SizeofCmsghdr) } type SocketControlMessage struct { @@ -72,7 +72,7 @@ func ParseSocketControlMessage(buf []byte) ([]SocketControlMessage, error) { func socketControlMessageHeaderAndData(buf []byte) (*Cmsghdr, []byte, error) { h := (*Cmsghdr)(unsafe.Pointer(&buf[0])) - if int(h.Len) < SizeofCmsghdr || int(h.Len) > len(buf) { + if h.Len < SizeofCmsghdr || int(h.Len) > len(buf) { return nil, nil, EINVAL } return h, buf[cmsgAlignOf(SizeofCmsghdr):], nil |