From 6445dad7d66fa6a1867090fcd9602c98863649f6 Mon Sep 17 00:00:00 2001 From: ebiggers Date: Sun, 8 Sep 2019 19:46:59 -0700 Subject: Fix various typos and grammatical errors (#141) These were found by a combination of manual review and a custom script that checks for common errors. Also removed an outdated sentence from the comment for setupBefore(). --- pam/constants.go | 2 +- pam/login.go | 6 +++--- pam/pam.c | 2 +- pam/pam.h | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'pam') diff --git a/pam/constants.go b/pam/constants.go index 5c57e06..d2d0cf3 100644 --- a/pam/constants.go +++ b/pam/constants.go @@ -52,7 +52,7 @@ package pam */ import "C" -// Item is a an PAM information type. +// Item is a PAM information type. type Item int // PAM Item types. diff --git a/pam/login.go b/pam/login.go index 346edd4..527b10d 100644 --- a/pam/login.go +++ b/pam/login.go @@ -48,9 +48,9 @@ var ( tokenToCheck *crypto.Key ) -// userInput is run when the the callback needs some input from the user. We -// prompt the user for information and return their answer. A return value of -// nil indicates an error occurred. +// userInput is run when the callback needs some input from the user. We prompt +// the user for information and return their answer. A return value of nil +// indicates an error occurred. //export userInput func userInput(prompt *C.char) *C.char { fmt.Print(C.GoString(prompt)) diff --git a/pam/pam.c b/pam/pam.c index bb16427..1859a2f 100644 --- a/pam/pam.c +++ b/pam/pam.c @@ -101,7 +101,7 @@ void* copyIntoSecret(void* data) { void freeSecret(pam_handle_t* pamh, char* data, int error_status) { size_t size = strlen(data) + 1; // Include null terminator - // Use volitile function pointer to actually clear the memory. + // Use volatile function pointer to actually clear the memory. static void* (*const volatile memset_sec)(void*, int, size_t) = &memset; memset_sec(data, 0, size); munlock(data, size); diff --git a/pam/pam.h b/pam/pam.h index 09afb2e..7571da8 100644 --- a/pam/pam.h +++ b/pam/pam.h @@ -35,7 +35,7 @@ void freeData(pam_handle_t *pamh, void *data, int error_status); // then frees the array itself. void freeArray(pam_handle_t *pamh, void **array, int error_status); -// Creates a copy of a C string, which resides in an locked buffer. +// Creates a copy of a C string, which resides in a locked buffer. void *copyIntoSecret(void *data); // CleaupFunc that Zeros wipes a C string and unlocks and frees its memory. -- cgit v1.2.3