static analyis fixes

This commit is contained in:
Anil Dasari 2020-04-24 14:47:05 -07:00 committed by Anil Dasari
parent 88228ac1d6
commit 5440369118
2 changed files with 2 additions and 8 deletions

View File

@ -341,8 +341,5 @@ func (c codec) unmarshal(p *wrappers.Packer, field reflect.Value) error {
// Returns true iff [field] should be serialized
func shouldSerialize(field reflect.StructField) bool {
if field.Tag.Get("serialize") == "true" {
return true
}
return false
return field.Tag.Get("serialize") == "true"
}

View File

@ -95,10 +95,7 @@ func (svm *SnowmanVM) Shutdown() {
// DBInitialized returns true iff [svm]'s database has values in it already
func (svm *SnowmanVM) DBInitialized() bool {
status := svm.State.GetStatus(svm.DB, dbInitializedID)
if status == choices.Accepted {
return true
}
return false
return status == choices.Accepted
}
// SetDBInitialized marks the database as initialized