snprintf(src, sizeof(src), "%s", inet_ntoa(vparams.src));
}
/* Create vres */
- if ((rv = fwp_vres_create(&vparams, &fwp_vres))) {
- return rv;
- }
+ if ((rv = fwp_vres_create(&vparams, &fwp_vres)))
+ return (rv == -1) ? errno : rv;
+
vres->priv = fwp_vres;
fres_contract_id_to_string(id, &vres->id, sizeof(id));
* \param[in] params Vres parameters
* \param[out] vresp Pointer to the descriptor of newly created vres
*
- * \return On success returns descriptor of vres.
- * On error, negative error code is returned.
- *
+ * \return Zero on success, -1 on error and errno is set
+ * appropriately.
*/
int fwp_vres_create(fwp_vres_params_t *params, fwp_vres_t **vresp)
{
*
* \param[in] vres Vres descriptor
*
- * \return On success returns 0.
- * On error, negative error code is returned.
- *
+ * \return Zero on success, -1 on error and errno is set
+ * appropriately.
*/
int fwp_vres_destroy(fwp_vres_t *vres)
{