- Changed strncpy to strlcpy, strncat to strlcat
- Added strlcpy and strlcat to SICS - Added a driver for the POLDI power supplies SKIPPED: psi/A1931.c psi/autowin.c psi/bruker.c psi/docho.c psi/dornier2.c psi/dspcode.c psi/ease.c psi/ecb.c psi/ecbcounter.c psi/ecbdriv.c psi/el734dc.c psi/el734driv.c psi/el734hp.c psi/el737driv.c psi/el737hpdriv.c psi/el737hpdrivsps.c psi/el737hpv2driv.c psi/el755driv.c psi/eurodriv.c psi/haakedriv.c psi/itc4driv.c psi/julcho.c psi/linadriv.c psi/lmd200.c psi/lscsupport.c psi/ltc11.c psi/make_gen psi/oicom.c psi/oxinst.c psi/pimotor.c psi/pipiezo.c psi/polterwrite.c psi/psi.c psi/sanscook.c psi/sanslirebin.c psi/sanswave.c psi/sinqhmdriv.c psi/sinqhttp.c psi/slsecho.c psi/slsmagnet.c psi/slsvme.c psi/sps.c psi/swmotor.c psi/swmotor2.c psi/tabledrive.c psi/tasscan.c psi/tdchm.c psi/velodorn.c psi/velodornier.c
This commit is contained in:
@ -360,30 +360,30 @@ void getRS232Error(int iCode, char *errorBuffer, int errorBufferLen)
|
||||
*/
|
||||
switch (iCode) {
|
||||
case BADMEMORY:
|
||||
strncpy(errorBuffer,
|
||||
strlcpy(errorBuffer,
|
||||
"Out of memory for appending terminators", errorBufferLen);
|
||||
break;
|
||||
case NOTCONNECTED:
|
||||
strncpy(errorBuffer, "Not connected!", errorBufferLen);
|
||||
strlcpy(errorBuffer, "Not connected!", errorBufferLen);
|
||||
break;
|
||||
case TIMEOUT:
|
||||
strncpy(errorBuffer,
|
||||
strlcpy(errorBuffer,
|
||||
"Timeout or network error when reading data", errorBufferLen);
|
||||
break;
|
||||
case FAILEDCONNECT:
|
||||
strncpy(errorBuffer,
|
||||
strlcpy(errorBuffer,
|
||||
"Failed to connect to terminal server", errorBufferLen);
|
||||
break;
|
||||
case INCOMPLETE:
|
||||
strncpy(errorBuffer, "Did not find terminator in read buffer",
|
||||
strlcpy(errorBuffer, "Did not find terminator in read buffer",
|
||||
errorBufferLen);
|
||||
break;
|
||||
case BADSEND:
|
||||
strncpy(errorBuffer, "Network problem: failed to send",
|
||||
strlcpy(errorBuffer, "Network problem: failed to send",
|
||||
errorBufferLen);
|
||||
break;
|
||||
default:
|
||||
strncpy(errorBuffer, strerror(errno), errorBufferLen);
|
||||
strlcpy(errorBuffer, strerror(errno), errorBufferLen);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user