- 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

@@ -197,16 +197,16 @@ static int DornierError(pVelSelDriv self, int *iCode, char *error,
switch (pDorn->iLastError) {
case NOCOMMAND:
strncpy(error, "No command was specified, internal error", iErrLen);
strlcpy(error, "No command was specified, internal error", iErrLen);
break;
case ECHOMISSING:
strncpy(error, "No echo received, may be busy", iErrLen);
strlcpy(error, "No echo received, may be busy", iErrLen);
break;
case BADANALYSIS:
strncpy(error, "Error analysing status messge", iErrLen);
strlcpy(error, "Error analysing status messge", iErrLen);
break;
case STARTTIMEOUT:
strncpy(error, "Velocity Selector failed to start", iErrLen);
strlcpy(error, "Velocity Selector failed to start", iErrLen);
break;
default:
SerialError(pDorn->iLastError, error, iErrLen);
@@ -407,7 +407,7 @@ static int DornierText(pVelSelDriv self, char *pText, int iTextLen)
sprintf(pHelp, "Vaccum: %f, Accel: %f", sStatus.vacuum, sStatus.accel);
strcat(pBueffel, pHelp);
strncpy(pText, pBueffel, iTextLen);
strlcpy(pText, pBueffel, iTextLen);
return 1;
}