Merge ~epics-core/epics-base/+git/fixups:aSubInit into ~epics-core/epics-base/+git/epics-base:3.14
Proposed by
mdavidsaver
Status: | Merged |
---|---|
Merged at revision: | 52787995757c2f9ec4906cbb6092f1cc4ae0520b |
Proposed branch: | ~epics-core/epics-base/+git/fixups:aSubInit |
Merge into: | ~epics-core/epics-base/+git/epics-base:3.14 |
Diff against target: |
18 lines (+8/-0) 1 file modified
src/rec/aSubRecord.c (+8/-0) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Andrew Johnson | Approve | ||
Review via email: mp+333414@code.launchpad.net |
Description of the change
For aSubRecord, handle EFLG="On Change" when an initial function (INAM) is used. Copy VAL* -> OVL* and NOV* -> ONV*.
Missed during my previous round of old-value initialization handling b63e381fbefd033
An almost trivial change. If we weren't preparing for a release I'd just push this, but it has no test coverage, and I'm not likely to produce any in the next few days.
To post a comment you must log in.
Thanks for waiting for a review as you'd have been wrong to push this change as it is.
The NOVx fields do not hold a byte-count, so feeding their values directly to memcpy() would only be correct when FTVx=CHAR or UCHAR, not for other data types. The correct number of bytes to copy should be calculated with (&prec- >ftva)[ i])
(&prec->nova)[i] * dbValueSize(
Personally I would also save the element count in a variable to avoid it being looked up twice inside the loop, but compilers may be clever enough to do that kind of thing for themselves now.