From: Juergen Perlinger Date: Mon, 26 Oct 2020 07:30:46 +0000 (+0100) Subject: [Bug 3677] additional peer events not decoded in associations listing X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=490ae70b230f8b850351ea7e29b1d472e9c42b13;p=thirdparty%2Fntp.git [Bug 3677] additional peer events not decoded in associations listing - add numeric formatting to default branch bk: 5f967b26xKoTW2oq2LqfwYpkl28SlQ --- diff --git a/ChangeLog b/ChangeLog index c5ac712d6..ec773cf39 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,6 @@ --- * [Bug 3677] additional peer events not decoded in associations listing - - patch by Gerry Garvey + - original patch by Gerry Garvey --- (4.2.8p15) 2020/06/23 Released by Harlan Stenn diff --git a/ntpq/ntpq-subs.c b/ntpq/ntpq-subs.c index f0eac056c..6a0c5daf5 100644 --- a/ntpq/ntpq-subs.c +++ b/ntpq/ntpq-subs.c @@ -1186,6 +1186,7 @@ printassoc( const char *condition = ""; const char *last_event; char buf[128]; + char numev[32]; if (numassoc == 0) { (void) xprintf(fp, "No association ID's in list\n"); @@ -1352,7 +1353,8 @@ printassoc( break; default: - last_event = ""; + snprintf(numev, sizeof(numev), "", event); + last_event = numev; break; } snprintf(buf, sizeof(buf),