From: Theodore Tso Date: Wed, 13 Sep 1995 17:59:23 +0000 (+0000) Subject: Fix fencepost error; use argv[1] to test for a specfied host if argc X-Git-Tag: krb5-1.0-beta6~1088 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=87d05ea8b0e5ef2e31aca13b4dcda4fa80ca0eb3;p=krb5.git 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 --- 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)) {