improved magic number variable names
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6832 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
dd5f74defc
commit
8241861213
@ -364,7 +364,7 @@ BaseTranslator::BitsCheck(BPositionIO *inSource, BMessage *ioExtension,
|
|||||||
// Convert the magic numbers to the various byte orders so that
|
// Convert the magic numbers to the various byte orders so that
|
||||||
// I won't have to convert the data read in to see whether or not
|
// I won't have to convert the data read in to see whether or not
|
||||||
// it is a supported type
|
// it is a supported type
|
||||||
uint32 nbits = B_HOST_TO_BENDIAN_INT32(B_TRANSLATOR_BITMAP);
|
const uint32 kBitsMagic = B_HOST_TO_BENDIAN_INT32(B_TRANSLATOR_BITMAP);
|
||||||
|
|
||||||
// Read in the magic number and determine if it
|
// Read in the magic number and determine if it
|
||||||
// is a supported type
|
// is a supported type
|
||||||
@ -379,9 +379,9 @@ BaseTranslator::BitsCheck(BPositionIO *inSource, BMessage *ioExtension,
|
|||||||
if (ioExtension && fSettings->LoadSettings(ioExtension) < B_OK)
|
if (ioExtension && fSettings->LoadSettings(ioExtension) < B_OK)
|
||||||
return B_BAD_VALUE;
|
return B_BAD_VALUE;
|
||||||
|
|
||||||
uint32 n32ch;
|
uint32 sourceMagic;
|
||||||
memcpy(&n32ch, ch, sizeof(uint32));
|
memcpy(&sourceMagic, ch, sizeof(uint32));
|
||||||
if (n32ch == nbits)
|
if (sourceMagic == kBitsMagic)
|
||||||
return B_OK;
|
return B_OK;
|
||||||
else
|
else
|
||||||
return B_OK + 1;
|
return B_OK + 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user