forked from armink/FlashDB
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fdb]Replaced
~0UL
in max value checks (armink#243)
The actual value of `~0UL` is architecture dependent. The `unsigned long` type must be at least 32 bits, but can be larger. Especially on 64-bit systems, `unsigned long` usually is 64 bits long, for which `~0UL` will result in `0xFFFFFFFFFFFFFFFF` instead of `0xFFFFFFFF`. If this is the case, comparisons like `kv->len == ~0UL`, where `kv->len` is of type `uint32_t`, are always false. This commit replaces `~0UL` with the appropriate max value defines from stdint.h.
- Loading branch information
Showing
2 changed files
with
3 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters