Skip to content

Commit 7d7c287

Browse files
committed
IdentifySxx(): make cppcheck happy
1 parent ab27316 commit 7d7c287

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

frmts/hdf5/hdf5drivercore.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,8 +275,8 @@ static bool IdentifySxx(GDALOpenInfo *poOpenInfo, const char *pszDriverName,
275275
{
276276
for (int i = 0; i <= poOpenInfo->nHeaderBytes - nLenGroupF; ++i)
277277
{
278-
if (poOpenInfo->pabyHeader[i] == pszMainGroupName[0] &&
279-
i <= poOpenInfo->nHeaderBytes - nLenMainGroup &&
278+
if (i <= poOpenInfo->nHeaderBytes - nLenMainGroup &&
279+
poOpenInfo->pabyHeader[i] == pszMainGroupName[0] &&
280280
memcmp(poOpenInfo->pabyHeader + i, pszMainGroupName,
281281
nLenMainGroup) == 0)
282282
{
@@ -292,8 +292,8 @@ static bool IdentifySxx(GDALOpenInfo *poOpenInfo, const char *pszDriverName,
292292
if (bFoundMainGroup)
293293
return true;
294294
}
295-
if (poOpenInfo->pabyHeader[i] == 'p' &&
296-
i <= poOpenInfo->nHeaderBytes - nLenProductSpecification &&
295+
if (i <= poOpenInfo->nHeaderBytes - nLenProductSpecification &&
296+
poOpenInfo->pabyHeader[i] == 'p' &&
297297
memcmp(poOpenInfo->pabyHeader + i, "productSpecification",
298298
nLenProductSpecification) == 0)
299299
{

0 commit comments

Comments
 (0)