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