Simplify link-type checks in soft device supports

This commit is contained in:
Andrew Johnson
2016-06-02 22:02:54 -05:00
parent 667f74759d
commit 7627454f63
16 changed files with 16 additions and 192 deletions
+1 -12
View File
@@ -52,20 +52,9 @@ epicsExportAddress(dset,devHistogramSoft);
static long init_record(histogramRecord *prec)
{
/* histogram.svl must be a CONSTANT or a PV_LINK or a DB_LINK or a CA_LINK*/
switch (prec->svl.type) {
case (CONSTANT) :
if (prec->svl.type == CONSTANT) {
if(recGblInitConstantLink(&prec->svl,DBF_DOUBLE,&prec->sgnl))
prec->udf = FALSE;
break;
case (PV_LINK) :
case (DB_LINK) :
case (CA_LINK) :
break;
default :
recGblRecordError(S_db_badField,(void *)prec,
"devHistogramSoft (init_record) Illegal SVL field");
return(S_db_badField);
}
return 0;
}