- Changed strncpy to strlcpy, strncat to strlcat

- Added strlcpy and strlcat to SICS
- Added a driver for the POLDI power supplies
This commit is contained in:
koennecke
2010-04-13 15:08:40 +00:00
parent 9e4eabeed1
commit dec6b04fa6
49 changed files with 679 additions and 653 deletions

View File

@ -325,41 +325,41 @@ static int BrukerError(pEVDriver pEva, int *iCode, char *pError,
*iCode = self->iLastError;
switch (*iCode) {
case NOFUNC:
strncpy(pError, "Function not supported", iErrLen);
strlcpy(pError, "Function not supported", iErrLen);
break;
case BADINTERN:
case BADARG:
strncpy(pError,
strlcpy(pError,
"Programming problem, reset Controller & contact Programmer",
iErrLen);
break;
case NOTFIELD:
strncpy(pError, "Bruker not switched to field mode", iErrLen);
strlcpy(pError, "Bruker not switched to field mode", iErrLen);
break;
case BADRANGE:
strncpy(pError, "Requested value out of range", iErrLen);
strlcpy(pError, "Requested value out of range", iErrLen);
break;
case NOACCESS:
strncpy(pError, "No Access, check key position at Controller",
strlcpy(pError, "No Access, check key position at Controller",
iErrLen);
break;
case ERRPENDING:
strncpy(pError, "Error condition pending in Bruker Controller",
strlcpy(pError, "Error condition pending in Bruker Controller",
iErrLen);
break;
case NOPOWER:
strncpy(pError,
strlcpy(pError,
"Power OFF as consequence of some error in Bruker Controller",
iErrLen);
break;
case NOCONN:
strncpy(pError, "No Connection to Bruker Controller", iErrLen);
strlcpy(pError, "No Connection to Bruker Controller", iErrLen);
break;
case BTIMEOUT:
strncpy(pError, "Timeout at serial port", iErrLen);
strlcpy(pError, "Timeout at serial port", iErrLen);
break;
case NOPOLUNIT:
strncpy(pError,
strlcpy(pError,
"No polarity switching unit, try setting negative current",
iErrLen);
break;