From 0ae50485cf3d46185501e18592921c74c8312e6e Mon Sep 17 00:00:00 2001 From: Andrew Johnson Date: Tue, 8 Jan 2019 14:42:43 -0600 Subject: [PATCH] Fix int64inRecord::get_units() --- modules/database/src/std/rec/int64inRecord.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/modules/database/src/std/rec/int64inRecord.c b/modules/database/src/std/rec/int64inRecord.c index 865d05fbb..c76d96c67 100644 --- a/modules/database/src/std/rec/int64inRecord.c +++ b/modules/database/src/std/rec/int64inRecord.c @@ -183,17 +183,16 @@ static long special(DBADDR *paddr, int after) #define indexof(field) int64inRecord##field -static long get_units(DBADDR *paddr,char *units) +static long get_units(DBADDR *paddr, char *units) { - int64inRecord *prec=(int64inRecord *)paddr->precord; + int64inRecord *prec = (int64inRecord *) paddr->precord; - if(paddr->pfldDes->field_type == DBF_LONG) { - strncpy(units,prec->egu,DB_UNITS_SIZE); + if (paddr->pfldDes->field_type == DBF_INT64) { + strncpy(units, prec->egu, DB_UNITS_SIZE); } - return(0); + return 0; } - static long get_graphic_double(DBADDR *paddr, struct dbr_grDouble *pgd) { int64inRecord *prec=(int64inRecord *)paddr->precord; @@ -255,7 +254,7 @@ static long get_alarm_double(DBADDR *paddr, struct dbr_alDouble *pad) static void checkAlarms(int64inRecord *prec, epicsTimeStamp *timeLast) { - enum { + enum { range_Lolo = 1, range_Low, range_Normal,