THRIFT-2372:thrift/json_protocol.go:160: function ends without a return statement
authorjfarrell <jfarrell@apache.org>
Sat, 22 Feb 2014 00:37:13 +0000 (19:37 -0500)
committerjfarrell <jfarrell@apache.org>
Sat, 22 Feb 2014 00:37:13 +0000 (19:37 -0500)
Client: go
Patch: jfarrell

Removes else block from function and just returns.

lib/go/thrift/json_protocol.go

index 7a5e16e..17fe530 100644 (file)
@@ -158,12 +158,10 @@ func (p *TJSONProtocol) WriteSetEnd() error {
 }
 
 func (p *TJSONProtocol) WriteBool(b bool) error {
-       //return p.OutputBool(b) - not for Thrift JSON
        if b {
                return p.WriteI32(1)
-    } else {
-               return p.WriteI32(0)
     }
+       return p.WriteI32(0)
 }
 
 func (p *TJSONProtocol) WriteByte(b byte) error {