Skip to content

Commit c631c21

Browse files
committed
Fix C89 compat
1 parent 8582be2 commit c631c21

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

fs.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8277,14 +8277,16 @@ FS_API fs_bool32 fs_path_is_last(const fs_path_iterator* pIterator)
82778277

82788278
FS_API int fs_path_iterators_compare(const fs_path_iterator* pIteratorA, const fs_path_iterator* pIteratorB)
82798279
{
8280+
int cmp;
8281+
82808282
FS_ASSERT(pIteratorA != NULL);
82818283
FS_ASSERT(pIteratorB != NULL);
82828284

82838285
if (pIteratorA->pFullPath == pIteratorB->pFullPath && pIteratorA->segmentOffset == pIteratorB->segmentOffset && pIteratorA->segmentLength == pIteratorB->segmentLength) {
82848286
return 0;
82858287
}
82868288

8287-
int cmp = fs_strncmp(pIteratorA->pFullPath + pIteratorA->segmentOffset, pIteratorB->pFullPath + pIteratorB->segmentOffset, FS_MIN(pIteratorA->segmentLength, pIteratorB->segmentLength));
8289+
cmp = fs_strncmp(pIteratorA->pFullPath + pIteratorA->segmentOffset, pIteratorB->pFullPath + pIteratorB->segmentOffset, FS_MIN(pIteratorA->segmentLength, pIteratorB->segmentLength));
82888290
if (cmp != 0) {
82898291
return cmp;
82908292
}

0 commit comments

Comments
 (0)