Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
06862617
Commit
06862617
authored
Oct 13, 2011
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build: fix for new return restriction
R=golang-dev, r CC=golang-dev
https://golang.org/cl/5257057
parent
f0e82dd4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
19 deletions
+24
-19
s2k.go
src/pkg/crypto/openpgp/s2k/s2k.go
+2
-2
auth.go
src/pkg/exp/gui/x11/auth.go
+7
-5
conn.go
src/pkg/exp/gui/x11/conn.go
+14
-11
reader.go
src/pkg/net/textproto/reader.go
+1
-1
No files found.
src/pkg/crypto/openpgp/s2k/s2k.go
View file @
06862617
...
...
@@ -100,7 +100,7 @@ func Parse(r io.Reader) (f func(out, in []byte), err os.Error) {
}
return
f
,
nil
case
2
:
_
,
err
:
=
io
.
ReadFull
(
r
,
buf
[
:
8
])
_
,
err
=
io
.
ReadFull
(
r
,
buf
[
:
8
])
if
err
!=
nil
{
return
}
...
...
@@ -109,7 +109,7 @@ func Parse(r io.Reader) (f func(out, in []byte), err os.Error) {
}
return
f
,
nil
case
3
:
_
,
err
:
=
io
.
ReadFull
(
r
,
buf
[
:
9
])
_
,
err
=
io
.
ReadFull
(
r
,
buf
[
:
9
])
if
err
!=
nil
{
return
}
...
...
src/pkg/exp/gui/x11/auth.go
View file @
06862617
...
...
@@ -65,23 +65,25 @@ func readAuth(displayStr string) (name, data string, err os.Error) {
return
}
for
{
family
,
err
:=
readU16BE
(
br
,
b
[
0
:
2
])
var
family
uint16
var
addr
,
disp
,
name0
,
data0
string
family
,
err
=
readU16BE
(
br
,
b
[
0
:
2
])
if
err
!=
nil
{
return
}
addr
,
err
:
=
readStr
(
br
,
b
[
0
:
])
addr
,
err
=
readStr
(
br
,
b
[
0
:
])
if
err
!=
nil
{
return
}
disp
,
err
:
=
readStr
(
br
,
b
[
0
:
])
disp
,
err
=
readStr
(
br
,
b
[
0
:
])
if
err
!=
nil
{
return
}
name0
,
err
:
=
readStr
(
br
,
b
[
0
:
])
name0
,
err
=
readStr
(
br
,
b
[
0
:
])
if
err
!=
nil
{
return
}
data0
,
err
:
=
readStr
(
br
,
b
[
0
:
])
data0
,
err
=
readStr
(
br
,
b
[
0
:
])
if
err
!=
nil
{
return
}
...
...
src/pkg/exp/gui/x11/conn.go
View file @
06862617
...
...
@@ -391,12 +391,13 @@ func checkPixmapFormats(r io.Reader, b []byte, n int) (agree bool, err os.Error)
// checkDepths checks that we have an agreeable X Depth (i.e. one that has an agreeable X VisualType).
func
checkDepths
(
r
io
.
Reader
,
b
[]
byte
,
n
int
,
visual
uint32
)
(
agree
bool
,
err
os
.
Error
)
{
for
i
:=
0
;
i
<
n
;
i
++
{
depth
,
err
:=
readU16LE
(
r
,
b
)
var
depth
,
visualsLen
uint16
depth
,
err
=
readU16LE
(
r
,
b
)
if
err
!=
nil
{
return
}
depth
&=
0xff
visualsLen
,
err
:
=
readU16LE
(
r
,
b
)
visualsLen
,
err
=
readU16LE
(
r
,
b
)
if
err
!=
nil
{
return
}
...
...
@@ -408,11 +409,11 @@ func checkDepths(r io.Reader, b []byte, n int, visual uint32) (agree bool, err o
for
j
:=
0
;
j
<
int
(
visualsLen
);
j
++
{
// Read 24 bytes: visual(4), class(1), bits per rgb value(1), colormap entries(2),
// red mask(4), green mask(4), blue mask(4), padding(4).
v
,
err
:=
readU32LE
(
r
,
b
)
_
,
err
=
readU32LE
(
r
,
b
)
rm
,
err
:=
readU32LE
(
r
,
b
)
gm
,
err
:=
readU32LE
(
r
,
b
)
bm
,
err
:=
readU32LE
(
r
,
b
)
v
,
_
:=
readU32LE
(
r
,
b
)
_
,
_
=
readU32LE
(
r
,
b
)
rm
,
_
:=
readU32LE
(
r
,
b
)
gm
,
_
:=
readU32LE
(
r
,
b
)
bm
,
_
:=
readU32LE
(
r
,
b
)
_
,
err
=
readU32LE
(
r
,
b
)
if
err
!=
nil
{
return
...
...
@@ -428,7 +429,8 @@ func checkDepths(r io.Reader, b []byte, n int, visual uint32) (agree bool, err o
// checkScreens checks that we have an agreeable X Screen.
func
checkScreens
(
r
io
.
Reader
,
b
[]
byte
,
n
int
)
(
root
,
visual
uint32
,
err
os
.
Error
)
{
for
i
:=
0
;
i
<
n
;
i
++
{
root0
,
err
:=
readU32LE
(
r
,
b
)
var
root0
,
visual0
,
x
uint32
root0
,
err
=
readU32LE
(
r
,
b
)
if
err
!=
nil
{
return
}
...
...
@@ -438,17 +440,18 @@ func checkScreens(r io.Reader, b []byte, n int) (root, visual uint32, err os.Err
if
err
!=
nil
{
return
}
visual0
,
err
:
=
readU32LE
(
r
,
b
)
visual0
,
err
=
readU32LE
(
r
,
b
)
if
err
!=
nil
{
return
}
// Next 4 bytes: backing stores, save unders, root depth, allowed depths length.
x
,
err
:
=
readU32LE
(
r
,
b
)
x
,
err
=
readU32LE
(
r
,
b
)
if
err
!=
nil
{
return
}
nDepths
:=
int
(
x
>>
24
)
agree
,
err
:=
checkDepths
(
r
,
b
,
nDepths
,
visual0
)
var
agree
bool
agree
,
err
=
checkDepths
(
r
,
b
,
nDepths
,
visual0
)
if
err
!=
nil
{
return
}
...
...
src/pkg/net/textproto/reader.go
View file @
06862617
...
...
@@ -256,7 +256,7 @@ func (r *Reader) ReadResponse(expectCode int) (code int, message string, err os.
for
err
==
nil
&&
continued
{
line
,
err
:=
r
.
ReadLine
()
if
err
!=
nil
{
return
return
0
,
""
,
err
}
var
code2
int
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment