Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

include $(GOROOT)/src/Make.inc

TARG=github.com/mmitton/asn1-ber
TARG=github.com/hsoj/asn1-ber
GOFILES=\
ber.go\

Expand Down
7 changes: 3 additions & 4 deletions ber.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"bytes"
"fmt"
"io"
"os"
"reflect"
)

Expand Down Expand Up @@ -167,7 +166,7 @@ func resizeBuffer( in []byte, new_size uint64 ) (out []byte) {
return
}

func readBytes( reader io.Reader, buf []byte ) os.Error {
func readBytes( reader io.Reader, buf []byte ) error {
idx := 0
buflen := len( buf )
for idx < buflen {
Expand All @@ -180,7 +179,7 @@ func readBytes( reader io.Reader, buf []byte ) os.Error {
return nil
}

func ReadPacket( reader io.Reader ) ( *Packet, os.Error) {
func ReadPacket( reader io.Reader ) ( *Packet, error) {
buf := make([]byte, 2)
err := readBytes( reader, buf )
if err != nil {
Expand Down Expand Up @@ -383,7 +382,7 @@ func Encode( ClassType, TagType, Tag uint8, Value interface{}, Description strin
p.Description = Description

if Value != nil {
v := reflect.NewValue(Value)
v := reflect.ValueOf(Value)

if ( ClassType == ClassUniversal ) {
switch Tag {
Expand Down