Merge Dirk Zimoch's fix_zero_size_arrays branch

This commit is contained in:
Andrew Johnson
2020-10-29 17:07:35 -05:00
12 changed files with 106 additions and 42 deletions

View File

@@ -42,7 +42,7 @@ static long init_record(dbCommon *pcommon)
long nelm = prec->nelm;
long status = dbLoadLinkArray(&prec->inp, prec->ftvl, prec->bptr, &nelm);
if (!status && nelm > 0) {
if (!status) {
prec->nord = nelm;
prec->udf = FALSE;
}
@@ -78,11 +78,14 @@ static long read_wf(waveformRecord *prec)
rt.ptime = (dbLinkIsConstant(&prec->tsel) &&
prec->tse == epicsTimeEventDeviceTime) ? &prec->time : NULL;
if (dbLinkIsConstant(&prec->inp))
return 0;
status = dbLinkDoLocked(&prec->inp, readLocked, &rt);
if (status == S_db_noLSET)
status = readLocked(&prec->inp, &rt);
if (!status && rt.nRequest > 0) {
if (!status) {
prec->nord = rt.nRequest;
prec->udf = FALSE;
if (nord != prec->nord)