- 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
velo.c
10
velo.c
@@ -95,7 +95,7 @@ static int VSLimits(void *pData, float fVal, char *pError, int iErrLen)
|
||||
if ((fVal < Alcatraz.fMin) || (fVal > Alcatraz.fMax)) {
|
||||
snprintf(pBueffel,sizeof(pBueffel)-1, " %f out of range: %f --- %f",
|
||||
fVal, Alcatraz.fMin, Alcatraz.fMax);
|
||||
strncpy(pError, pBueffel, iErrLen);
|
||||
strlcpy(pError, pBueffel, iErrLen);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -106,7 +106,7 @@ static int VSLimits(void *pData, float fVal, char *pError, int iErrLen)
|
||||
if ((fVal > Alcatraz.fMin) && (fVal < Alcatraz.fMax)) {
|
||||
snprintf(pBueffel,sizeof(pBueffel)-1, " %f violates forbidden region %f --- %f",
|
||||
fVal, Alcatraz.fMin, Alcatraz.fMax);
|
||||
strncpy(pError, pBueffel, iErrLen);
|
||||
strlcpy(pError, pBueffel, iErrLen);
|
||||
return 0;
|
||||
}
|
||||
iRet = LLDnodePtr2Next(self->iForbidden);
|
||||
@@ -679,7 +679,7 @@ static int DummyVelError(pEVDriver self, int *iCode, char *pError,
|
||||
assert(ich);
|
||||
|
||||
if (ich->iLastError == VELONOTPERMITTED) {
|
||||
strncpy(pError,
|
||||
strlcpy(pError,
|
||||
"ERROR: this operation is NOT Permitted, use velocity selector object instead",
|
||||
iErrLen);
|
||||
*iCode = VELONOTPERMITTED;
|
||||
@@ -847,8 +847,8 @@ int VelSelFactory(SConnection * pCon, SicsInterp * pSics, void *pData,
|
||||
return 0;
|
||||
}
|
||||
pBueffel[0] = '\0';
|
||||
strncpy(pBueffel, argv[1],255);
|
||||
strncat(pBueffel, "watch",255);
|
||||
strlcpy(pBueffel, argv[1],255);
|
||||
strlcat(pBueffel, "watch",255);
|
||||
pNew->pMonitor = CreateEVController(pMonDriv, pBueffel, &iRet);
|
||||
if (!pNew->pMonitor) {
|
||||
DeleteEVDriver(pMonDriv); /* was missing M.Z. Jul 04 */
|
||||
|
||||
Reference in New Issue
Block a user