dev builds
themes manual
device status forums
mailing lists
IRC bugs
dev guide

Rockbox mail archive

Subject: Re: YA S.C Q (Yet another settings.c question)

Re: YA S.C Q (Yet another settings.c question)

From: Linus Nielsen Feltzing <>
Date: Tue, 29 Apr 2003 10:03:33 +0200

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 !=
> 0xFF.
> 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.

Received on 2003-04-29

Page template was last modified "Tue Sep 7 00:00:02 2021" The Rockbox Crew -- Privacy Policy