mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 18:35:06 -05:00
Use only 3 chars from refclock driver name in default refid
This commit is contained in:
@@ -208,7 +208,7 @@ RCL_AddRefclock(RefclockParameters *params)
|
||||
else {
|
||||
unsigned char ref[5] = { 0, 0, 0, 0, 0 };
|
||||
|
||||
snprintf((char *)ref, 5, "%3s%d", params->driver_name, n_sources % 10);
|
||||
snprintf((char *)ref, 5, "%3.3s%d", params->driver_name, n_sources % 10);
|
||||
inst->ref_id = ref[0] << 24 | ref[1] << 16 | ref[2] << 8 | ref[3];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user