cleanup bool usage

This commit is contained in:
Pavol Rusnak 2022-08-31 12:01:09 +02:00
parent 15bb58980a
commit 66aa82f8a8
No known key found for this signature in database
GPG key ID: 91F3B339B9A02A3D
4 changed files with 6 additions and 6 deletions

View file

@ -97,7 +97,7 @@ func setup_card_record(uid string, ctr uint32, uid_bin []byte, ctr_bin []byte, c
return err
}
if cmac_valid == true {
if cmac_valid {
log.WithFields(log.Fields{
"i": i,
"card.card_id": card.card_id,
@ -223,7 +223,7 @@ func parse_request(req *http.Request) (int, error) {
return 0, err
}
if cmac_valid == false {
if !cmac_valid {
return 0, errors.New("cmac incorrect")
}
@ -235,7 +235,7 @@ func parse_request(req *http.Request) (int, error) {
return 0, err
}
if counter_ok == false {
if !counter_ok {
return 0, errors.New("counter not increasing")
}