Skip to content

Commit

Permalink
fix z_keyexpr_as_view_string (#534)
Browse files Browse the repository at this point in the history
* fix z_keyexpr_as_view_string broken during merge

* remove empty line
  • Loading branch information
DenisBiryukov91 authored Jul 12, 2024
1 parent 72fdf90 commit 7395557
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/api/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,8 @@ int8_t z_view_keyexpr_from_str_unchecked(z_view_keyexpr_t *keyexpr, const char *
}

int8_t z_keyexpr_as_view_string(const z_loaned_keyexpr_t *keyexpr, z_view_string_t *s) {
int8_t ret = _Z_RES_OK;
if (keyexpr->_id == Z_RESOURCE_ID_NONE) {
s->_val = _z_string_wrap(keyexpr->_suffix);
} else {
ret = _Z_ERR_GENERIC;
}

return ret;
s->_val = _z_string_wrap(keyexpr->_suffix);
return _Z_RES_OK;
}

int8_t z_keyexpr_concat(z_owned_keyexpr_t *key, const z_loaned_keyexpr_t *left, const char *right, size_t len) {
Expand Down

0 comments on commit 7395557

Please sign in to comment.