commit | 60976d353effd937b53a171e7493148a9969e39a | [log] [tgz] |
---|---|---|
author | David Symonds <dsymonds@golang.org> | Tue Jan 06 07:56:48 2015 +1100 |
committer | David Symonds <dsymonds@golang.org> | Tue Jan 06 07:56:48 2015 +1100 |
tree | d80b0947d24e1de59555ad0ab5af8b602d2cd097 | |
parent | 3ea3e05dbfae8d2dd0cc219b5f0f0ba4606d15eb [diff] |
Simplify Uint32 helper function to be like the others.
diff --git a/proto/lib.go b/proto/lib.go index e8b6549..fe0818c 100644 --- a/proto/lib.go +++ b/proto/lib.go
@@ -323,9 +323,7 @@ // Uint32 is a helper routine that allocates a new uint32 value // to store v and returns a pointer to it. func Uint32(v uint32) *uint32 { - p := new(uint32) - *p = v - return p + return &v } // Uint64 is a helper routine that allocates a new uint64 value