Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 4064541

Browse files
committedMay 9, 2024·
Fix return value in case of error
1 parent 4285c04 commit 4064541

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎certificates/install_darwin.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,9 @@ func GetExpirationDate() (time.Time, error) {
221221
s := C.GoString(p)
222222
if len(s) != 0 {
223223
utilities.UserPrompt(s, "\"OK\"", "OK", "Arduino Agent: Error retrieving expiration date")
224-
return "", errors.New(s)
224+
return time.Time{}, errors.New(s)
225225
}
226-
dateValue, _ := strconv.Atoi(C.GoString(dateString))
226+
dateValue, _ := strconv.ParseInt(C.GoString(dateString), 10, 64)
227227
return time.Unix(dateValue, 0).AddDate(31, 0, 0), nil
228228
}
229229

0 commit comments

Comments
 (0)
Please sign in to comment.