]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
authkeys.c cleanup from Dave Mills
authorHarlan Stenn <stenn@ntp.org>
Mon, 9 Nov 2009 09:08:41 +0000 (04:08 -0500)
committerHarlan Stenn <stenn@ntp.org>
Mon, 9 Nov 2009 09:08:41 +0000 (04:08 -0500)
bk: 4af7dc19ONPl5tsOuXm11fEnp6Q_EA

ChangeLog
libntp/authkeys.c

index 1d70f1fe7a06c9ffd52987e230f04e8e5b4dd0c8..a4b2ecb0bdaef667d33483ba39b97605134e2d42 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,4 @@
+* authkeys.c cleanup from Dave Mills.
 (4.2.5p241-RC) 2009/11/07 Released by Harlan Stenn <stenn@ntp.org>
 * html/authopt.html update from Dave Mills.
 * Remove unused file from sntp/Makefile.am's distribution list.
index 043e428398dc92adeb6709323224a07946ecd42c..9c32e09f36a43fa2e7e9e1bc3e9af05304dcfdaa 100644 (file)
@@ -149,15 +149,14 @@ authhavekey(
         */
        authkeyuncached++;
        sk = key_hash[KEYHASH(keyno)];
-       while (sk != 0) {
+       while (sk != NULL) {
                if (keyno == sk->keyid) {
                        if (sk->type == 0) {
                                authkeynotfound++;
                                return (0);
                        }
+                       break;
                }
-               break;
-
                sk = sk->next;
        }
 
@@ -165,7 +164,7 @@ authhavekey(
         * If the key is not found, or if it is found but not trusted,
         * the key is not considered found.
         */
-       if (sk == 0) {
+       if (sk == NULL) {
                authkeynotfound++;
                return (0);