Browse Source

Simplify Uint32 helper function to be like the others.

David Symonds 11 years ago
parent
commit
60976d353e
1 changed files with 1 additions and 3 deletions
  1. 1 3
      proto/lib.go

+ 1 - 3
proto/lib.go

@@ -323,9 +323,7 @@ func Float64(v float64) *float64 {
 // 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