From 3ea56e1ff0a437b65150ac92b20b0a53534df446 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Wed, 30 Jul 2014 11:04:42 +0200 Subject: [PATCH] Document that some functions can return NULL on error. --- src/meshlink.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/meshlink.h b/src/meshlink.h index 3f8c1c82..39f278d2 100644 --- a/src/meshlink.h +++ b/src/meshlink.h @@ -96,7 +96,7 @@ extern const char *meshlink_strerror(meshlink_errno_t err); * @param name The name which this instance of the application will use in the mesh. * After the function returns, the application is free to overwrite or free @a name @a. * - * @return A pointer to a meshlink_handle_t which represents this instance of MeshLink. + * @return A pointer to a meshlink_handle_t which represents this instance of MeshLink, or NULL in case of an error. * The pointer is valid until meshlink_close() is called. */ extern meshlink_handle_t *meshlink_open(const char *confbase, const char *name); @@ -296,7 +296,7 @@ extern bool meshlink_add_address(meshlink_handle_t *mesh, const char *address); * @param name The name that the invitee will use in the mesh. * After this function returns, the application is free to overwrite or free @a name @a. * - * @return This function returns a string that contains the invitation URL. + * @return This function returns a string that contains the invitation URL, or NULL in case of an error. * The application should call free() after it has finished using the URL. */ extern char *meshlink_invite(meshlink_handle_t *mesh, const char *name); @@ -321,7 +321,7 @@ extern bool meshlink_join(meshlink_handle_t *mesh, const char *invitation); * * @param mesh A handle which represents an instance of MeshLink. * - * @return This function returns a string that contains the exported key and addresses. + * @return This function returns a string that contains the exported key and addresses, or NULL in case of an error. * The application should call free() after it has finished using this string. */ extern char *meshlink_export(meshlink_handle_t *mesh); -- 2.39.5