Rockbox mail archive
Subject: Re: YA S.C Q (Yet another settings.c question)
From: Linus Nielsen Feltzing (linus_at_haxx.se)
c s wrote:
> I don’t know if this is an oversight or I just don’t
> understand the conventions used when adding things to
> settings.c, but it looks like in some cases we check
> that the bytes of config_block != 0xFF before using
> the data in the byte to load the global settings, but
> there are many places where this is not done... for
> example, no check is done with the 9 settings starting
> with “fade_on_stop” at line 670. Is this intentional?
> Also “fade_on_stop” is set again later at line 695,
> this time after checking that the config_block byte !=
> Are these errors? Should I submit a patch?
Yes, they are bugs. Submit a patch if you like.
> Also, if the convention is to always check for 0xFF,
> what if every bit of a config_block byte is used, and
> the user select settings make that byte - 0xFF?
We try to make sure that the byte can never be 0xff, either by using
only 7 bits, or by not using the full range of the bit fields.
Page was last modified "Jan 10 2012" The Rockbox Crew