mirror of
https://github.com/apple/container.git
synced 2026-09-26 09:35:37 +00:00
ContainerizationOS: minor fixes (#241)
While reviewing test coverage, I noticed a couple of minor issues: - 0 is non-negative - allow for zero memory - we should likely use lstat instead of stat for file info - we should check for empty name parameter --------- Signed-off-by: Eric Ernst <eric_ernst@apple.com>
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
|
||||
extension BinaryInteger {
|
||||
private func toUnsignedMemoryAmount(_ amount: UInt64) -> UInt64 {
|
||||
guard self > 0 else {
|
||||
guard self >= 0 else {
|
||||
fatalError("encountered negative number during conversion to memory amount")
|
||||
}
|
||||
let val = UInt64(self)
|
||||
|
||||
Reference in New Issue
Block a user