From 11d1f151590bd5bf172afe7774369109d42a8034 Mon Sep 17 00:00:00 2001 From: "Janet B. Anderson" Date: Fri, 14 Jun 1991 10:54:59 +0000 Subject: [PATCH] udf fix when inp is a constant --- src/dev/devSiSoft.c | 1 + src/rec/recStringout.c | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/dev/devSiSoft.c b/src/dev/devSiSoft.c index 0b930ca1d..1f1d7b17d 100644 --- a/src/dev/devSiSoft.c +++ b/src/dev/devSiSoft.c @@ -78,6 +78,7 @@ static long init_record(pstringin) sprintf(pstringin->val,"%-14.7g",pstringin->inp.value.value); pstringin->udf= FALSE; } + pstringin->udf= FALSE; break; case (PV_LINK) : break; diff --git a/src/rec/recStringout.c b/src/rec/recStringout.c index 1d4cf0d00..88195c2fb 100644 --- a/src/rec/recStringout.c +++ b/src/rec/recStringout.c @@ -114,8 +114,10 @@ static long init_record(pstringout) return(S_dev_missingSup); } /* get the initial value dol is a constant*/ - if (pstringout->dol.type == CONSTANT && pstringout->dol.value.value!=0.0 ){ - sprintf(pstringout->val,"%-14.7g",pstringout->dol.value.value); + if (pstringout->dol.type == CONSTANT){ + if (pstringout->dol.value.value!=0.0 ){ + sprintf(pstringout->val,"%-14.7g",pstringout->dol.value.value); + } pstringout->udf=FALSE; } if( pdset->init_record ) { @@ -151,7 +153,7 @@ static long process(paddr) pstringout->nsev = VALID_ALARM; pstringout->nsta = LINK_ALARM; } - } + } else pstringout->udf=FALSE; } }