Fix issue with RSRV_SERVER_PORT above 9999

don't worry about null termination on epicsSnprintf call
This commit is contained in:
Tynan Ford
2024-06-14 16:01:33 -04:00
committed by mdavidsaver
parent 72d50ce274
commit 772c10d904

View File

@ -590,8 +590,7 @@ void rsrv_init (void)
errlogPrintf ( "cas " ERL_WARNING ": reachable with UDP unicast (a host's IP in EPICS_CA_ADDR_LIST)\n" );
}
epicsSnprintf(buf, sizeof(buf)-1u, "%u", ca_server_port);
buf[sizeof(buf)-1u] = '\0';
epicsSnprintf(buf, sizeof(buf), "%u", ca_server_port);
epicsEnvSet("RSRV_SERVER_PORT", buf);
}