Lines Matching refs:result
413 unsigned char *result; in coap_new_uri() local
415 result = coap_malloc(length + 1 + sizeof(coap_uri_t)); in coap_new_uri()
417 if (!result) in coap_new_uri()
420 memcpy(URI_DATA(result), uri, length); in coap_new_uri()
421 URI_DATA(result)[length] = '\0'; /* make it zero-terminated */ in coap_new_uri() local
423 if (coap_split_uri(URI_DATA(result), length, (coap_uri_t *)result) < 0) { in coap_new_uri()
424 coap_free(result); in coap_new_uri()
427 return (coap_uri_t *)result; in coap_new_uri()
432 coap_uri_t *result; in coap_clone_uri() local
437 result = (coap_uri_t *)coap_malloc( uri->query.length + uri->host.length + in coap_clone_uri()
440 if ( !result ) in coap_clone_uri()
443 memset( result, 0, sizeof(coap_uri_t) ); in coap_clone_uri()
445 result->port = uri->port; in coap_clone_uri()
448 result->host.s = URI_DATA(result); in coap_clone_uri()
449 result->host.length = uri->host.length; in coap_clone_uri()
451 memcpy(result->host.s, uri->host.s, uri->host.length); in coap_clone_uri()
455 result->path.s = URI_DATA(result) + uri->host.length; in coap_clone_uri()
456 result->path.length = uri->path.length; in coap_clone_uri()
458 memcpy(result->path.s, uri->path.s, uri->path.length); in coap_clone_uri()
462 result->query.s = URI_DATA(result) + uri->host.length + uri->path.length; in coap_clone_uri()
463 result->query.length = uri->query.length; in coap_clone_uri()
465 memcpy(result->query.s, uri->query.s, uri->query.length); in coap_clone_uri()
468 return result; in coap_clone_uri()