diff options
author | Krzysztof Opasiak <k.opasiak@samsung.com> | 2014-03-03 14:04:59 +0100 |
---|---|---|
committer | Krzysztof Opasiak <k.opasiak@samsung.com> | 2014-03-11 09:25:12 +0100 |
commit | bf0a163d8b747787e21bed358cade4c2e35e51c3 (patch) | |
tree | 32d2d67cb4464b9038783ee1cd5d91163dc46f3c /include/usbg | |
parent | e2ba8b878f79f6c3f56a7fc291d738232d57d5da (diff) | |
download | libusbg-bf0a163d8b747787e21bed358cade4c2e35e51c3.tar.gz libusbg-bf0a163d8b747787e21bed358cade4c2e35e51c3.tar.bz2 libusbg-bf0a163d8b747787e21bed358cade4c2e35e51c3.zip |
libusbg: Return error code instead of NULL pointer - config.
Change usbg_get_config_strs() and usbg_get_config_attrs()
to return usbg_error instead of NULL pointer.
Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Diffstat (limited to 'include/usbg')
-rw-r--r-- | include/usbg/usbg.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/include/usbg/usbg.h b/include/usbg/usbg.h index 6855833..1bb652e 100644 --- a/include/usbg/usbg.h +++ b/include/usbg/usbg.h @@ -502,10 +502,9 @@ extern int usbg_set_config_attrs(usbg_config *c, * @brief Get the USB configuration strings * @param c Pointer to configuration * @param c_attrs Structure to be filled - * @retur Pointer to filled structure or NULL if error occurred. + * @return 0 on success or usbg_error if error occurred. */ -extern usbg_config_attrs *usbg_get_config_attrs(usbg_config *c, - usbg_config_attrs *c_attrs); +extern int usbg_get_config_attrs(usbg_config *c, usbg_config_attrs *c_attrs); /** * @brief Set the configuration maximum power @@ -528,9 +527,9 @@ extern int usbg_set_config_bm_attrs(usbg_config *c, int bmAttributes); * @param c Pointer to configuration * @param lang Language of strings * @param c_sttrs Structure to be filled - * @retur Pointer to filled structure or NULL if error occurred. + * @return 0 on success or usbg_error if error occurred. */ -extern usbg_config_strs *usbg_get_config_strs(usbg_config *c, int lang, +extern int usbg_get_config_strs(usbg_config *c, int lang, usbg_config_strs *c_strs); /** |