aboutsummaryrefslogtreecommitdiffstats
path: root/Sources/WireGuardApp/ZipArchive/ZipArchive.swift
diff options
context:
space:
mode:
authorAndrej Mihajlov <and@mullvad.net>2020-12-02 15:08:45 +0100
committerAndrej Mihajlov <and@mullvad.net>2020-12-03 13:32:25 +0100
commit5a044e412945c6efc8ddb53050c3588134f42c72 (patch)
treeb02bf046b95bb224ab45783314dfaeac94d19de7 /Sources/WireGuardApp/ZipArchive/ZipArchive.swift
parentWireGuardApp: Fix build working dir for go-bridge targets (diff)
downloadwireguard-apple-5a044e412945c6efc8ddb53050c3588134f42c72.tar.xz
wireguard-apple-5a044e412945c6efc8ddb53050c3588134f42c72.zip
Linter: Fix all linter issues across the codebase
Signed-off-by: Andrej Mihajlov <and@mullvad.net>
Diffstat (limited to 'Sources/WireGuardApp/ZipArchive/ZipArchive.swift')
-rw-r--r--Sources/WireGuardApp/ZipArchive/ZipArchive.swift6
1 files changed, 3 insertions, 3 deletions
diff --git a/Sources/WireGuardApp/ZipArchive/ZipArchive.swift b/Sources/WireGuardApp/ZipArchive/ZipArchive.swift
index 9c2f634..78419b3 100644
--- a/Sources/WireGuardApp/ZipArchive/ZipArchive.swift
+++ b/Sources/WireGuardApp/ZipArchive/ZipArchive.swift
@@ -47,7 +47,7 @@ extension ZipArchive {
static func unarchive(url: URL, requiredFileExtensions: [String]) throws -> [(fileBaseName: String, contents: Data)] {
var results = [(fileBaseName: String, contents: Data)]()
- var requiredFileExtensionsLowercased = requiredFileExtensions.map { $0.lowercased() }
+ let requiredFileExtensionsLowercased = requiredFileExtensions.map { $0.lowercased() }
guard let zipFile = unzOpen64(url.path) else {
throw ZipArchiveError.cantOpenInputZipFile
@@ -62,8 +62,8 @@ extension ZipArchive {
guard unzOpenCurrentFile(zipFile) == UNZ_OK else { throw ZipArchiveError.badArchive }
let bufferSize = 16384 // 16 KiB
- var fileNameBuffer = UnsafeMutablePointer<Int8>.allocate(capacity: bufferSize)
- var dataBuffer = UnsafeMutablePointer<Int8>.allocate(capacity: bufferSize)
+ let fileNameBuffer = UnsafeMutablePointer<Int8>.allocate(capacity: bufferSize)
+ let dataBuffer = UnsafeMutablePointer<Int8>.allocate(capacity: bufferSize)
defer {
fileNameBuffer.deallocate()