[haiku-bugs] Re: [Haiku] #11117: FAT: issues with lowercase 8.3 filenames

  • From: "pulkomandy" <trac@xxxxxxxxxxxx>
  • Date: Fri, 26 Dec 2014 08:30:33 -0000

#11117: FAT: issues with lowercase 8.3 filenames
--------------------------------+----------------------------
   Reporter:  MatejHorvat       |      Owner:  nobody
       Type:  bug               |     Status:  new
   Priority:  normal            |  Milestone:  R1
  Component:  File Systems/FAT  |    Version:  R1/Development
 Resolution:                    |   Keywords:
 Blocked By:                    |   Blocking:
Has a Patch:  1                 |   Platform:  All
--------------------------------+----------------------------

Comment (by pulkomandy):

 I suggested to replace the magic number by constants. So instead of
 writing {{{buffer[0xc]}}} you would write:

 {{{
 static const kWhateverOffset = 0xc;
 }}}

 Then later in the code:

 {{{
 buffer[kWhateverOffset] = x;
 }}}

 This makes it clear what the byte is used for, making the code easier to
 read. No need to convert to structures (which would not necesarily be a
 good idea as it could have endianness problems).

--
Ticket URL: <https://dev.haiku-os.org/ticket/11117#comment:9>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: