From: Harlan Stenn Date: Fri, 17 Dec 2004 09:28:23 +0000 (-0500) Subject: cleanup X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=de611243c6dfd71550d52900c9756acfd1cfd4ac;p=thirdparty%2Fntp.git cleanup bk: 41c2a6b7Da4FeGSbCoXOLINwoncCsg --- diff --git a/ntpdc/ntpdc.c b/ntpdc/ntpdc.c index dd08857434..3168596ea9 100644 --- a/ntpdc/ntpdc.c +++ b/ntpdc/ntpdc.c @@ -1463,8 +1463,8 @@ help( if (*(xcp->keyword) != '?') list[words++] = xcp->keyword; } - for (xcp = opcmds; xcp->keyword != 0; xcp++) - cmdsort[n++] = xcp->keyword; + for (xcp = opcmds; xcp->keyword != 0; xcp++) + list[words++] = xcp->keyword; qsort( #ifdef QSORT_USES_VOID_P diff --git a/ntpq/ntpq.c b/ntpq/ntpq.c index 48d5d56221..5f74a1b2c5 100644 --- a/ntpq/ntpq.c +++ b/ntpq/ntpq.c @@ -1998,8 +1998,6 @@ help( FILE *fp ) { - int i; - int n; struct xcmd *xcp; char *cmd; const char *list[100]; @@ -2014,7 +2012,7 @@ help( list[words++] = xcp->keyword; } for (xcp = opcmds; xcp->keyword != 0; xcp++) - cmdsort[n++] = xcp->keyword; + list[words++] = xcp->keyword; qsort( #ifdef QSORT_USES_VOID_P @@ -2049,7 +2047,7 @@ help( (void) fprintf(stderr, "Command `%s' is unknown\n", cmd); return; - } else if (n >= 2) { + } else if (words >= 2) { (void) fprintf(stderr, "Command `%s' is ambiguous\n", cmd); return;