Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1457)

Delta Between Two Patch Sets: src/pkg/syscall/sockcmsg_unix.go

Issue 5011046: code review 5011046: build: add build comments to core packages (Closed)
Left Patch Set: Created 12 years, 6 months ago
Right Patch Set: diff -r a12d99eb48bb https://go.googlecode.com/hg Created 12 years, 6 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « src/pkg/syscall/route_bsd.go ('k') | src/pkg/syscall/syscall_bsd.go » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 // Copyright 2011 The Go Authors. All rights reserved. 1 // Copyright 2011 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4
5 // +build darwin freebsd linux openbsd
4 6
5 // Socket control messages 7 // Socket control messages
6 8
7 package syscall 9 package syscall
8 10
9 import ( 11 import (
10 "unsafe" 12 "unsafe"
11 ) 13 )
12 14
13 // Round the length of a raw sockaddr up to align it propery. 15 // Round the length of a raw sockaddr up to align it propery.
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 if msg.Header.Type != SCM_RIGHTS { 106 if msg.Header.Type != SCM_RIGHTS {
105 return nil, EINVAL 107 return nil, EINVAL
106 } 108 }
107 fds := make([]int, len(msg.Data)>>2) 109 fds := make([]int, len(msg.Data)>>2)
108 for i, j := 0, 0; i < len(msg.Data); i += 4 { 110 for i, j := 0, 0; i < len(msg.Data); i += 4 {
109 fds[j] = int(*(*int32)(unsafe.Pointer(&msg.Data[i]))) 111 fds[j] = int(*(*int32)(unsafe.Pointer(&msg.Data[i])))
110 j++ 112 j++
111 } 113 }
112 return fds, 0 114 return fds, 0
113 } 115 }
LEFTRIGHT

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b