uint8_t *z;
int r;
- assert(ret);
- assert(ret_len);
assert(p || l == 0);
if (l == SIZE_MAX)
*z = 0;
- *ret_len = (size_t) (z - buf);
- *ret = TAKE_PTR(buf);
+ if (ret_len)
+ *ret_len = (size_t) (z - buf);
+ if (ret)
+ *ret = TAKE_PTR(buf);
return 0;
int r;
assert(p || l == 0);
- assert(ret);
- assert(ret_size);
if (l == SIZE_MAX)
l = strlen(p);
*z = 0;
- *ret_size = (size_t) (z - buf);
- *ret = TAKE_PTR(buf);
+ if (ret_size)
+ *ret_size = (size_t) (z - buf);
+ if (ret)
+ *ret = TAKE_PTR(buf);
return 0;