| commit | e575a84d5f051483793b14c07b60720d0ed318b3 | [log] [tgz] |
|---|---|---|
| author | David Benjamin <davidben@google.com> | Fri Dec 19 14:02:48 2025 -0500 |
| committer | Boringssl LUCI CQ <boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com> | Fri Dec 19 15:31:23 2025 -0800 |
| tree | b2f386e94e680a2f3cb0dbbceda92b56d0c7f4ad | |
| parent | 7ef8fe77f9632d659e635f881141ed9bbf6c5b4c [diff] |
inject_hash: Convert more Go empty string checks See https://boringssl-review.googlesource.com/c/boringssl/+/86007 Change-Id: I5e1dbf61e5e98bf7530a5d041613a8ce5c06c5b7 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/86089 Reviewed-by: Adam Langley <agl@google.com> Auto-Submit: David Benjamin <davidben@google.com> Commit-Queue: Adam Langley <agl@google.com>
diff --git a/util/fipstools/inject_hash/inject_hash.go b/util/fipstools/inject_hash/inject_hash.go index a60a0e0..fdd6f4a 100644 --- a/util/fipstools/inject_hash/inject_hash.go +++ b/util/fipstools/inject_hash/inject_hash.go
@@ -39,10 +39,10 @@ var isStatic bool var perm os.FileMode - if len(arInput) > 0 { + if arInput != "" { isStatic = true - if len(oInput) > 0 { + if oInput != "" { return fmt.Errorf("-in-archive and -in-object are mutually exclusive") } @@ -70,7 +70,7 @@ for _, contents := range ar { objectBytes = contents } - } else if len(oInput) > 0 { + } else if oInput != "" { fi, err := os.Stat(oInput) if err != nil { return err @@ -88,7 +88,7 @@ // Hash a different object if specified. var err error hashBytes := objectBytes - if len(hashInput) > 0 { + if hashInput != "" { hashBytes, err = os.ReadFile(hashInput) if err != nil { return err