Skip to content

Commit

Permalink
Avoid shadowing global variable
Browse files Browse the repository at this point in the history
  • Loading branch information
thbeu committed Jan 22, 2024
1 parent 63b2d3a commit 29116cb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sbnsearch.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,13 @@ SBNSearchHandle SBNOpenDiskTree(const char *pszSBNFilename,
/* -------------------------------------------------------------------- */
/* Establish the byte order on this machine. */
/* -------------------------------------------------------------------- */
bool bBigEndian;
bool _bBigEndian;
{
int i = 1;
if (*REINTERPRET_CAST(unsigned char *, &i) == 1)
bBigEndian = false;
_bBigEndian = false;
else
bBigEndian = true;
_bBigEndian = true;
}

/* -------------------------------------------------------------------- */
Expand Down Expand Up @@ -191,7 +191,7 @@ SBNSearchHandle SBNOpenDiskTree(const char *pszSBNFilename,
memcpy(&hSBN->dfMaxX, abyHeader + 48, 8);
memcpy(&hSBN->dfMaxY, abyHeader + 56, 8);

if (!bBigEndian)
if (!_bBigEndian)
{
SwapWord(8, &hSBN->dfMinX);
SwapWord(8, &hSBN->dfMinY);
Expand Down

0 comments on commit 29116cb

Please sign in to comment.