Skip to content

Commit

Permalink
Fixed Function Prototype Descriptions for Error Codes
Browse files Browse the repository at this point in the history
Added error codes that may be returned for element extractors

- Added error code OMRPORT_ERROR_INVALID_ARGUMENTS to reflect
  user input error and passing in non valid arguments.

Issue: eclipse-omr#4745

Signed-off-by: Haley Cao <haleycao88@hotmail.com>
  • Loading branch information
Haley Cao committed Feb 6, 2020
1 parent c9f67ec commit 2e29986
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions port/common/omrsock.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ omrsock_getaddrinfo(struct OMRPortLibrary *portLibrary, char *node, char *servic
* @param[in] handle The result structure returned by @ref omrsock_getaddrinfo.
* @param[out] length The number of results.
*
* @return 0, if no errors occurred, otherwise return an error.
* @return 0, if no errors occurred, otherwise return an error. Error code values returned are
* \arg OMRPORT_ERROR_INVALID_ARGUMENTS when handle or index arguments are invalid.
*/
int32_t
omrsock_getaddrinfo_length(struct OMRPortLibrary *portLibrary, omrsock_addrinfo_t handle, uint32_t *length)
Expand All @@ -119,7 +120,8 @@ omrsock_getaddrinfo_length(struct OMRPortLibrary *portLibrary, omrsock_addrinfo_
* @param[out] family The family at "index".
* @param[in] index The index into the structure returned by @ref omrsock_getaddrinfo.
*
* @return 0, if no errors occurred, otherwise return an error.
* @return 0, if no errors occurred, otherwise return an error. Error code values returned are
* \arg OMRPORT_ERROR_INVALID_ARGUMENTS when handle or index arguments are invalid.
*/
int32_t
omrsock_getaddrinfo_family(struct OMRPortLibrary *portLibrary, omrsock_addrinfo_t handle, int32_t *family, int32_t index)
Expand All @@ -136,7 +138,8 @@ omrsock_getaddrinfo_family(struct OMRPortLibrary *portLibrary, omrsock_addrinfo_
* @param[out] socktype The socket type at "index".
* @param[in] index The index into the structure returned by @ref omrsock_getaddrinfo.
*
* @return 0, if no errors occurred, otherwise return an error.
* @return 0, if no errors occurred, otherwise return an error. Error code values returned are
* \arg OMRPORT_ERROR_INVALID_ARGUMENTS when handle or index arguments are invalid.
*/
int32_t
omrsock_getaddrinfo_socktype(struct OMRPortLibrary *portLibrary, omrsock_addrinfo_t handle, int32_t *socktype, int32_t index)
Expand All @@ -153,7 +156,8 @@ omrsock_getaddrinfo_socktype(struct OMRPortLibrary *portLibrary, omrsock_addrinf
* @param[out] protocol The protocol family at "index".
* @param[in] index The index into the structure returned by @ref omrsock_getaddrinfo.
*
* @return 0, if no errors occurred, otherwise return an error.
* @return 0, if no errors occurred, otherwise return an error. Error code values returned are
* \arg OMRPORT_ERROR_INVALID_ARGUMENTS when handle or index arguments are invalid.
*/
int32_t
omrsock_getaddrinfo_protocol(struct OMRPortLibrary *portLibrary, omrsock_addrinfo_t handle, int32_t *protocol, int32_t index)
Expand Down

0 comments on commit 2e29986

Please sign in to comment.