- 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:
10
ltc11.c
10
ltc11.c
@ -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);
|
||||
|
Reference in New Issue
Block a user