EPICS Home

Experimental Physics and Industrial Control System


 
2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Problem in macLib macExpandString?
From: Andrew Johnson <[email protected]>
To: <[email protected]>
Date: Mon, 17 Apr 2017 12:02:15 -0500
Hi Mark,

On 04/16/2017 08:54 PM, Mark Rivers wrote:
> I have made the following changes to macLibTest.c
> 
> corvette:src/libCom/test>diff macLibTest.c.orig macLibTest.c
> 68c68
> <     testPlan(89);
> ---
>>     testPlan(91);
> 204a205,207
>>
>>     check("$(FOO)$(FOO1)", "!VAL2$(FOO1,undefined)");
>>     check("$(FOO1)$(FOO)", "!$(FOO1,undefined)VAL2");

Acknowledged, good catch!

I will commit this and the fix to the 3.14 branch.


> I made this change to macCore.c
> 
> corvette:src/libCom/macLib>diff macCore.c.orig macCore.c
> 872c872
> <                 entry->error = refentry->error;
> ---
>>                 if (refentry->error == TRUE) entry->error = TRUE;

The change I'm committing is slightly different:

-                entry->error = refentry->error;
+                entry->error = entry->error || refentry->error;

Note: Unless a data type is a true boolean, equality-comparing an
integer value with TRUE (i.e. 1) is generally not a good idea in case it
was actually set to some other non-zero value. Both (x==FALSE) and
(x!=FALSE) are OK, but neither (x==TRUE) nor (x!=TRUE) work properly
when x is -1 for example. Much better to use just (x), (!x) or even
(!!x) when you need a guaranteed 0-or-1 value.

Thanks for the report, I just committed these to the 3.14 git branch.

- Andrew

-- 
Arguing for surveillance because you have nothing to hide is no
different than making the claim, "I don't care about freedom of
speech because I have nothing to say." -- Edward Snowdon

References:
RE: Problem in macLib macExpandString? Mark Rivers

Navigate by Date:
Prev: RE: Problem in macLib macExpandString? Mark Rivers
Next: Jenkins build is back to stable : epics-base-3.14 #239 APS Jenkins
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Problem in macLib macExpandString? Mark Rivers
Next: Bug in dbUnitTest.c Andrew Johnson
Index: 2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <20172018  2019  2020  2021  2022  2023  2024