From 87d05ea8b0e5ef2e31aca13b4dcda4fa80ca0eb3 Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Wed, 13 Sep 1995 17:59:23 +0000 Subject: [PATCH] Fix fencepost error; use argv[1] to test for a specfied host if argc is >= 1, not just > 1. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6775 dc483132-0cff-0310-8789-dd5450dbe970 --- src/tests/resolve/ChangeLog | 4 ++++ src/tests/resolve/resolve.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/tests/resolve/ChangeLog b/src/tests/resolve/ChangeLog index aa74e10db..9b9269b9e 100644 --- a/src/tests/resolve/ChangeLog +++ b/src/tests/resolve/ChangeLog @@ -1,3 +1,7 @@ +Wed Sep 13 13:57:40 1995 Theodore Y. Ts'o + + * resolve.c (main): Fix fencepost error; use argv[1] to test for a + specfied host if argc is >= 1, not just > 1. Wed Jul 12 12:32:14 EDT 1995 Paul Park (pjpark@mit.edu) * Makefile.in - Add LD_LIBRARY_PATH in case we were linked with shared diff --git a/src/tests/resolve/resolve.c b/src/tests/resolve/resolve.c index af292e051..90cf1d256 100644 --- a/src/tests/resolve/resolve.c +++ b/src/tests/resolve/resolve.c @@ -81,7 +81,7 @@ main(argc, argv) argc--; argv++; } - if (argc > 1) { + if (argc >= 1) { strncpy(myname, *argv, MAXHOSTNAMELEN); } else { if(gethostname(myname, MAXHOSTNAMELEN)) { -- 2.26.2