[PATCH 24/65] warn about keyname password if it can't be found

From: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
Date: Thu, 17 Apr 2014 17:06:37 +0200

Signed-off-by: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
---
 ii.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/ii.c b/ii.c
index 94138e4..b662d4a 100644
--- a/ii.c
+++ b/ii.c
_AT_@ -513,7 +513,7 @@ run(int ircfd, char *host) {
 int
 main(int argc, char *argv[]) {
 	struct passwd *spw;
-	char *key = NULL, *fullname = NULL, *host = "";
+	char *key = NULL, *fullname = NULL, *host = "", *keyname = "";
 	char prefix[_POSIX_PATH_MAX];
 	long port = SERVER_PORT;
 	int ircfd;
_AT_@ -542,8 +542,9 @@ main(int argc, char *argv[]) {
 			strlcpy(nick, EARGF(usage()), sizeof(nick));
 			break;
 		case 'k':
-			if(!(key = getenv(EARGF(usage()))))
-				eprintf("can't get password from $%s", key);
+			keyname = EARGF(usage());
+			if(!(key = getenv(keyname)))
+				eprintf("can't get password from $%s\n", keyname);
 			break;
 		case 'f':
 			fullname = EARGF(usage());
-- 
2.4.10
--Multipart=_Mon__9_May_2016_17_21_10_+0200_I.6cpFVydhq75aaE
Content-Type: text/x-diff;
 name="0025-prefix-errors-with-ii.patch"
Content-Disposition: attachment;
 filename="0025-prefix-errors-with-ii.patch"
Content-Transfer-Encoding: 7bit
Received on Mon Sep 17 2001 - 00:00:00 CEST

This archive was generated by hypermail 2.3.0 : Mon May 09 2016 - 17:24:22 CEST