use epicsAssert

This commit is contained in:
Jeff Hill
2000-10-06 00:33:31 +00:00
parent c5f33a7475
commit 8b8b4a736d
2 changed files with 13 additions and 8 deletions

View File

@@ -563,14 +563,18 @@ db_field_log *pfl
* assert() is safe here because the type was
* checked by db_get_field()
*/
assert (pevext->msg.m_dataType < NELEMENTS(cac_dbr_cvrt));
/* use type as index into conversion jumptable */
(* cac_dbr_cvrt[pevext->msg.m_dataType])
( reply + 1,
reply + 1,
TRUE, /* host -> net format */
pevext->msg.m_count);
if (pevext->msg.m_dataType >= NELEMENTS(cac_dbr_cvrt)) {
memset((void *)(reply+1), 0, pevext->size);
reply->m_cid = ECA_GETFAIL;
}
else {
/* use type as index into conversion jumptable */
(* cac_dbr_cvrt[pevext->msg.m_dataType])
( reply + 1,
reply + 1,
TRUE, /* host -> net format */
pevext->msg.m_count);
}
#endif
/*
* force string message size to be the true size rounded to even

View File

@@ -41,6 +41,7 @@
#include "dbNotify.h"
#include "caProto.h"
#include "ellLib.h"
#include "epicsAssert.h"
#define epicsExportSharedSymbols
#include "rsrv.h"