From: Miroslav Lichvar Date: Tue, 17 Feb 2015 09:26:06 +0000 (+0100) Subject: refclock: start refid numbering at zero X-Git-Tag: 2.0-pre2~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e5cf4645fe9683be79c8b147f5b0afd2ff1495bb;p=thirdparty%2Fchrony.git refclock: start refid numbering at zero Commit d92583ed inadvertently changed the refclock refid numbering to start from 1 instead of 0. Restore the original numbering. --- diff --git a/refclock.c b/refclock.c index 5b728eb4..59e92972 100644 --- a/refclock.c +++ b/refclock.c @@ -226,7 +226,7 @@ RCL_AddRefclock(RefclockParameters *params) inst->ref_id = params->ref_id; else { unsigned char ref[5] = { 0, 0, 0, 0, 0 }; - unsigned int index = ARR_GetSize(refclocks); + unsigned int index = ARR_GetSize(refclocks) - 1; snprintf((char *)ref, sizeof (ref), "%3.3s", params->driver_name); ref[3] = index % 10 + '0';