Skip to content

Commit

Permalink
Rewrite a couple yoda style conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
horgh committed Nov 2, 2023
1 parent e714886 commit b859139
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/maxminddb.c
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,7 @@ static int find_address_in_search_tree(const MMDB_s *const mmdb,
sa_family_t address_family,
MMDB_lookup_result_s *result) {
record_info_s record_info = record_info_for_database(mmdb);
if (0 == record_info.right_record_offset) {
if (record_info.right_record_offset == 0) {
return MMDB_UNKNOWN_DATABASE_FORMAT_ERROR;
}

Expand Down Expand Up @@ -1074,7 +1074,7 @@ int MMDB_read_node(const MMDB_s *const mmdb,
uint32_t node_number,
MMDB_search_node_s *const node) {
record_info_s record_info = record_info_for_database(mmdb);
if (0 == record_info.right_record_offset) {
if (record_info.right_record_offset == 0) {
return MMDB_UNKNOWN_DATABASE_FORMAT_ERROR;
}

Expand Down

0 comments on commit b859139

Please sign in to comment.