Lines Matching defs:result
411 * sufficient space to hold the result. This function is supposed to
416 * @param buf The result buffer.
639 unsigned char *result;
641 result = (unsigned char *)coap_malloc_type(COAP_STRING, length + 1 + sizeof(coap_uri_t));
643 if (!result)
646 memcpy(URI_DATA(result), uri, length);
647 URI_DATA(result)[length] = '\0'; /* make it zero-terminated */
649 if (coap_split_uri(URI_DATA(result), length, (coap_uri_t *)result) < 0) {
650 coap_free_type(COAP_STRING, result);
653 return (coap_uri_t *)result;
658 coap_uri_t *result;
664 result = (coap_uri_t *)coap_malloc_type(COAP_STRING, uri->query.length + uri->host.length +
667 if (!result)
670 memset(result, 0, sizeof(coap_uri_t));
672 result->port = uri->port;
675 result->host.s = p = URI_DATA(result);
676 result->host.length = uri->host.length;
682 result->path.s = p = URI_DATA(result) + uri->host.length;
683 result->path.length = uri->path.length;
689 result->query.s = p = URI_DATA(result) + uri->host.length + uri->path.length;
690 result->query.length = uri->query.length;
695 return result;