- 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

10
ltc11.c
View File

@ -313,21 +313,21 @@ static int LTC11Error(pEVDriver pEva, int *iCode, char *pError,
*iCode = self->iLastError;
switch (*iCode) {
case NOCONN:
strncpy(pError, "No Connection to Bruker Controller", iErrLen);
strlcpy(pError, "No Connection to Bruker Controller", iErrLen);
break;
case MISERABLE:
case BADSTATE:
strncpy(pError, "The LTC-11 is in a very bad state", iErrLen);
strlcpy(pError, "The LTC-11 is in a very bad state", iErrLen);
break;
case BADANSWER:
strncpy(pError, "The LTC-11 returned a bad reply", iErrLen);
strlcpy(pError, "The LTC-11 returned a bad reply", iErrLen);
break;
case BADCONFIRM:
strncpy(pError, "The LTC-11 did not accept the new set point",
strlcpy(pError, "The LTC-11 did not accept the new set point",
iErrLen);
break;
case TIMEOUT:
strncpy(pError, "Timeout receiving data from LTC-11", iErrLen);
strlcpy(pError, "Timeout receiving data from LTC-11", iErrLen);
break;
default:
SerialError(*iCode, pError, iErrLen);