db: move db_field_log dtor out of union

This commit is contained in:
Michael Davidsaver
2022-06-12 07:46:39 -07:00
parent 5ba8080f6e
commit 9048aa3438
6 changed files with 12 additions and 12 deletions
+2 -2
View File
@@ -302,7 +302,7 @@ static db_field_log * pre(void *user, dbChannel *chan, db_field_log *pLog) {
pLog->field_type++;
if (my->offpre == 0) { /* The first one registers a dtor and saves pfl */
pLog->u.r.dtor = dtor;
pLog->dtor = dtor;
dtorpfl = pLog;
}
@@ -345,7 +345,7 @@ static db_field_log * post(void *user, dbChannel *chan, db_field_log *pLog) {
pLog->field_type++;
if (my->offpost == 0) { /* The first one registers a dtor and saves pfl */
pLog->u.r.dtor = dtor;
pLog->dtor = dtor;
dtorpfl = pLog;
}
+1 -1
View File
@@ -179,7 +179,7 @@ static void check(short dbr_type) {
pfl->field_type = DBF_CHAR; \
pfl->field_size = 1; \
pfl->no_elements = 26; \
pfl->u.r.dtor = freeArray; \
pfl->dtor = freeArray; \
pfl->u.r.field = epicsStrDup("abcdefghijklmnopqrsstuvwxyz"); \
testOk(!dbChannelGetField(pch, DBR_LONG, buf, NULL, &req, pfl), "Got Field value"); \
testOk(req == Size, "Got %ld elements (expected %d)", req, Size); \