[PATCH] Cleanup OSTC debug code

Anton Lundin glance at acc.umu.se
Tue Dec 30 07:06:41 PST 2014


On 30 December, 2014 - Dirk Hohndel wrote:

> On Tue, Dec 30, 2014 at 10:48:42AM +0100, Anton Lundin wrote:
> > The old OSTC debug code was a bit ugly. This cleans that up and contains
> > all the ugly-ness behind the ifdef.
> 
> I'm not sure I understand this patch.
> 
> Previously we didn't actually open the device for an OSTC 2N, but only if
> DEBUG_OSTC was set. Now we ALWAYS don't open the device for an OSTC 2N,
> regardless of the DEBUG_OSTC setting.
> 
> If that's the code you wanted, then the commit message doesn't match.
> 
> Please clarify
> 

If you look a bit wider than the diff context shows you, you will see
that the whole thing is inside the #ifdef DEBUG_OSTC block.

As the commit message tries to explain, this moves the whole ugly fake a
dc_device_open behind the DEBUG_OSTC. The #ifdef DEBUG_OSTC are already
there, so they doesn't show up in the output.


What i noted is that i forgot to clean up the #ifdef DEBUG_OSTC in the
WriteSettingsThread::run(), which i can fix.


//Anton


-- 
Anton Lundin	+46702-161604


More information about the subsurface mailing list