Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

Commit

Permalink
Make use of "mmdb" consistent in the docs (maxmind#124)
Browse files Browse the repository at this point in the history
  • Loading branch information
oschwald committed Oct 10, 2016
1 parent f735fb9 commit 00c1ab7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions doc/libmaxminddb.md
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ the database. If you have already resolved an address you can call
```c
int gai_error, mmdb_error;
MMDB_lookup_result_s result =
MMDB_lookup_string(mmdb, "1.2.3.4", &gai_error, &mmdb_error);
MMDB_lookup_string(&mmdb, "1.2.3.4", &gai_error, &mmdb_error);
if (0 != gai_error) { ... }
if (MMDB_SUCCESS != mmdb_error) { ... }
Expand Down Expand Up @@ -517,7 +517,7 @@ the `MMDB_lookup_string()` function.
```c
int mmdb_error;
MMDB_lookup_result_s result =
MMDB_lookup_sockaddr(mmdb, address->ai_addr, &mmdb_error);
MMDB_lookup_sockaddr(&mmdb, address->ai_addr, &mmdb_error);
if (MMDB_SUCCESS != mmdb_error) { ... }
if (result.found_entry) { ... }
Expand Down Expand Up @@ -573,7 +573,7 @@ We could look up the English name with this code:

```c
MMDB_lookup_result_s result =
MMDB_lookup_sockaddr(mmdb, address->ai_addr, &mmdb_error);
MMDB_lookup_sockaddr(&mmdb, address->ai_addr, &mmdb_error);
MMDB_entry_data_s entry_data;
int status =
MMDB_get_value(&result.entry, &entry_data,
Expand Down Expand Up @@ -617,7 +617,7 @@ at once, rather than looking up each piece using repeated calls to

```c
MMDB_lookup_result_s result =
MMDB_lookup_sockaddr(mmdb, address->ai_addr, &mmdb_error);
MMDB_lookup_sockaddr(&mmdb, address->ai_addr, &mmdb_error);
MMDB_entry_data_list_s *entry_data_list, *first;
int status =
MMDB_get_entry_data_list(&result.entry, &entry_data_list);
Expand Down Expand Up @@ -697,7 +697,7 @@ with the metadata than using the metadata structure directly.
```c
MMDB_entry_data_list_s *entry_data_list, *first;
int status =
MMDB_get_metadata_as_entry_data_list(mmdb, &entry_data_list);
MMDB_get_metadata_as_entry_data_list(&mmdb, &entry_data_list);
if (MMDB_SUCCESS != status) { ... }
first = entry_data_list;
... // do something with the data
Expand Down

0 comments on commit 00c1ab7

Please sign in to comment.