]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
cleanup
authorHarlan Stenn <stenn@ntp.org>
Fri, 17 Dec 2004 09:28:23 +0000 (04:28 -0500)
committerHarlan Stenn <stenn@ntp.org>
Fri, 17 Dec 2004 09:28:23 +0000 (04:28 -0500)
bk: 41c2a6b7Da4FeGSbCoXOLINwoncCsg

ntpdc/ntpdc.c
ntpq/ntpq.c

index dd088574345f240eac5f0e42b87b4307b0b50e10..3168596ea99b9238ffad63be994179c59e2373df 100644 (file)
@@ -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
index 48d5d5622124e4c10004883342b39c8697b8363a..5f74a1b2c5e7439388015fc5fa6910f0d249218a 100644 (file)
@@ -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;