- Changed strncpy to strlcpy, strncat to strlcat
- Added strlcpy and strlcat to SICS - Added a driver for the POLDI power supplies SKIPPED: psi/A1931.c psi/autowin.c psi/bruker.c psi/docho.c psi/dornier2.c psi/dspcode.c psi/ease.c psi/ecb.c psi/ecbcounter.c psi/ecbdriv.c psi/el734dc.c psi/el734driv.c psi/el734hp.c psi/el737driv.c psi/el737hpdriv.c psi/el737hpdrivsps.c psi/el737hpv2driv.c psi/el755driv.c psi/eurodriv.c psi/haakedriv.c psi/itc4driv.c psi/julcho.c psi/linadriv.c psi/lmd200.c psi/lscsupport.c psi/ltc11.c psi/make_gen psi/oicom.c psi/oxinst.c psi/pimotor.c psi/pipiezo.c psi/polterwrite.c psi/psi.c psi/sanscook.c psi/sanslirebin.c psi/sanswave.c psi/sinqhmdriv.c psi/sinqhttp.c psi/slsecho.c psi/slsmagnet.c psi/slsvme.c psi/sps.c psi/swmotor.c psi/swmotor2.c psi/tabledrive.c psi/tasscan.c psi/tdchm.c psi/velodorn.c psi/velodornier.c
This commit is contained in:
10
motorsec.c
10
motorsec.c
@@ -135,7 +135,7 @@ static int SecMotorCheckBoundary(pMotor self, float fVal, float *fTarget,
|
||||
/* check for fixed */
|
||||
if (fixed >= 0) {
|
||||
snprintf(pBueffel,sizeof(pBueffel)-1, "Motor %s is Fixed", self->name);
|
||||
strncpy(pError, pBueffel, iErrLen);
|
||||
strlcpy(pError, pBueffel, iErrLen);
|
||||
return 0; /* is this an error? */
|
||||
}
|
||||
|
||||
@@ -143,13 +143,13 @@ static int SecMotorCheckBoundary(pMotor self, float fVal, float *fTarget,
|
||||
if (fVal > upperlim) {
|
||||
snprintf(pBueffel,sizeof(pBueffel)-1, "%f violates upper software limit %f on %s",
|
||||
fVal, upperlim, self->name);
|
||||
strncpy(pError, pBueffel, iErrLen);
|
||||
strlcpy(pError, pBueffel, iErrLen);
|
||||
return 0;
|
||||
}
|
||||
if (fVal < lowerlim) {
|
||||
snprintf(pBueffel,sizeof(pBueffel)-1, "%f violates lower software limit %f on %s",
|
||||
fVal, lowerlim, self->name);
|
||||
strncpy(pError, pBueffel, iErrLen);
|
||||
strlcpy(pError, pBueffel, iErrLen);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -167,13 +167,13 @@ static int SecMotorCheckBoundary(pMotor self, float fVal, float *fTarget,
|
||||
if (fHard > hupper) {
|
||||
snprintf(pBueffel,sizeof(pBueffel)-1, "%f violates upper hardware limit %f on %s",
|
||||
fVal, hupper, self->name);
|
||||
strncpy(pError, pBueffel, iErrLen);
|
||||
strlcpy(pError, pBueffel, iErrLen);
|
||||
return 0;
|
||||
}
|
||||
if (fHard < hlower) {
|
||||
snprintf(pBueffel,sizeof(pBueffel)-1, "%f violates lower hardware limit %f on %s",
|
||||
fVal, hlower, self->name);
|
||||
strncpy(pError, pBueffel, iErrLen);
|
||||
strlcpy(pError, pBueffel, iErrLen);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user