• Status Closed
  • Percent Complete
  • Task Type Patches
  • Category Applications
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Daily build (which?)
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by fml2 - 2008-10-22
Last edited by jdgordon - 2008-10-23

FS#9504 - Simplify the FILENAME_SETTING macro, making its usage less error prone

The patch eliminates the last parameter (len) of the macro FILENAME_SETTING thus making it easier to use and at the same time less error prone. Before, the string size had to be written down twice: once in the definition of the setting (in setting.h) and then in the definition of how the setting is stored in the cfg file. Both sizes should match. But since all setting strings are defined as char arrays we can just use sizeof(), no need to explicitly specify the max length.

The max_length member (in struct filename_setting) could probably also be eliminated, but I wanted to make the patch as small as possible.

Closed by  jdgordon
2008-10-23 00:29
Reason for closing:  Accepted
Additional comments about closing:  



Available keyboard shortcuts


Task Details

Task Editing