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
9714c220
Commit
9714c220
authored
Aug 10, 2010
by
Robert Griesemer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asn1: remove superfluous if's, unused function
R=adg CC=golang-dev
https://golang.org/cl/1743059
parent
7d3173fc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
23 deletions
+6
-23
marshal.go
src/pkg/asn1/marshal.go
+6
-23
No files found.
src/pkg/asn1/marshal.go
View file @
9714c220
...
...
@@ -96,19 +96,6 @@ func marshalBase128Int(out *forkableWriter, n int64) (err os.Error) {
return
nil
}
func
base128Length
(
i
int
)
(
numBytes
int
)
{
if
i
==
0
{
return
1
}
for
i
>
0
{
numBytes
++
i
>>=
7
}
return
}
func
marshalInt64
(
out
*
forkableWriter
,
i
int64
)
(
err
os
.
Error
)
{
n
:=
int64Length
(
i
)
...
...
@@ -125,18 +112,14 @@ func marshalInt64(out *forkableWriter, i int64) (err os.Error) {
func
int64Length
(
i
int64
)
(
numBytes
int
)
{
numBytes
=
1
if
i
>
0
{
for
i
>
127
{
numBytes
++
i
>>=
8
}
for
i
>
127
{
numBytes
++
i
>>=
8
}
if
i
<
0
{
for
i
<
-
128
{
numBytes
++
i
>>=
8
}
for
i
<
-
128
{
numBytes
++
i
>>=
8
}
return
...
...
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