FreeBSD/contrib/ntp/ntpd/ntp_peer.c
/* peer_cleanup - clean peer list prior to shutdown */
clean peer list prior to shutdown
clean peer list prior to shutdown
void peer_cleanup(void)
{
        struct peer *peer;
        associd_t assoc;
        for (assoc = initial_association_ID; assoc != current_association_ID; assoc++) {
            if (assoc != 0U) {
                peer = findpeerbyassoc(assoc);
                if (peer != NULL)
                    unpeer(peer);
            }
        }
        peer = findpeerbyassoc(current_association_ID);
        if (peer != NULL)
            unpeer(peer);
}
void peer_cleanup ( void ) { struct peer * peer ; associd_t assoc ; for ( assoc = initial_association_ID ; assoc != current_association_ID ; assoc ++ ) { if ( assoc != 0U ) { peer = findpeerbyassoc ( assoc ) ; if ( peer != NULL ) unpeer ( peer ) ; } } peer = findpeerbyassoc ( current_association_ID ) ; if ( peer != NULL ) unpeer ( peer ) ; }
peer_cleanup - clean peer list prior to shutdown
peer_cleanup - clean peer list prior to shutdown