aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--man/dbfp_query_location.35
1 files changed, 4 insertions, 1 deletions
diff --git a/man/dbfp_query_location.3 b/man/dbfp_query_location.3
index b620283..5be7bdb 100644
--- a/man/dbfp_query_location.3
+++ b/man/dbfp_query_location.3
@@ -202,10 +202,11 @@ if an error occurs during the parsing of the \s-1XML\s0 response
if the \s-1API\s0 response has not the expected structure
.SH "EXAMPLE"
.IX Header "EXAMPLE"
-.Vb 3
+.Vb 4
\& #include <dbfp.h>
\& #include <stdio.h>
\& #include <stdlib.h>
+\& #include <string.h>
\&
\& int main(int argc, char **argv)
\& {
@@ -229,6 +230,8 @@ if the \s-1API\s0 response has not the expected structure
\& locations[i].lat);
\&
\& cleanup:
+\& if (err)
+\& printf("An error occured: %s\en", strerror(err));
\& for (i = 0; i < n; i++)
\& dbfp_location_close(&locations[i]);
\& free(locations);