- 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:
6
tdchm.c
6
tdchm.c
@ -325,17 +325,17 @@ static int TDCGetError(pHistDriver self, int *iCode, char *perror,
|
||||
*iCode = tdc->errorCode;
|
||||
switch (tdc->errorCode) {
|
||||
case COMMERROR:
|
||||
strncpy(perror, "Communication problem with TDC", iErrlen);
|
||||
strlcpy(perror, "Communication problem with TDC", iErrlen);
|
||||
break;
|
||||
case MAXEXCEEDED:
|
||||
strncpy(perror, "Requested to many channels for read", iErrlen);
|
||||
strlcpy(perror, "Requested to many channels for read", iErrlen);
|
||||
break;
|
||||
default:
|
||||
if (tdc->counter != NULL) {
|
||||
tdc->counter->pDriv->GetError(tdc->counter->pDriv,
|
||||
iCode, perror, iErrlen);
|
||||
} else {
|
||||
strncpy(perror, "Undefined error code", iErrlen);
|
||||
strlcpy(perror, "Undefined error code", iErrlen);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user