From 3ac040f90a15dc00d85a60324deb70f9fad96c3c Mon Sep 17 00:00:00 2001 From: Victor Sigler Date: Sat, 30 Mar 2019 19:55:32 -0400 Subject: [PATCH] Remove the construction of the UnsafePointer Remove the unnecessary construction of the UnsafePointer as the `sterror` returns a `UnsafeMutablePointer!` --- Sources/Errno.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/Errno.swift b/Sources/Errno.swift index acef4235..7d4375b7 100644 --- a/Sources/Errno.swift +++ b/Sources/Errno.swift @@ -10,6 +10,7 @@ import Foundation public class Errno { public class func description() -> String { - return String(cString: UnsafePointer(strerror(errno))) + // https://forums.developer.apple.com/thread/113919 + return String(cString: strerror(errno)) } }