Skip to content

Commit

Permalink
fix removing nil check
Browse files Browse the repository at this point in the history
  • Loading branch information
umit committed Sep 5, 2024
1 parent 3f9ec9d commit 3462925
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions go/api/response_handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ func handleIntegerResponse(response *C.struct_CommandResponse) int64 {

// handleBooleanResponse converts a C struct_CommandResponse's bool_value to a Go bool.
func handleBooleanResponse(response *C.struct_CommandResponse) bool {
if response == nil {
return false
}
defer C.free_command_response(response)
return bool(response.bool_value)
}

Expand Down

0 comments on commit 3462925

Please sign in to comment.