From c1535d25baa524638542e9c94135337bb9d4b102 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20H=C3=BC=C3=9Fler?= Date: Thu, 1 Aug 2024 11:27:55 +0200 Subject: [PATCH] nanocoap: constify coap_match_path() API --- sys/include/net/nanocoap.h | 2 +- sys/net/application_layer/nanocoap/nanocoap.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/include/net/nanocoap.h b/sys/include/net/nanocoap.h index 044ea13433..d99857e99d 100644 --- a/sys/include/net/nanocoap.h +++ b/sys/include/net/nanocoap.h @@ -2245,7 +2245,7 @@ extern ssize_t coap_well_known_core_default_handler(coap_pkt_t *pkt, \ * @return <0 if the resource path sorts before the URI * @return >0 if the resource path sorts after the URI */ -int coap_match_path(const coap_resource_t *resource, uint8_t *uri); +int coap_match_path(const coap_resource_t *resource, const uint8_t *uri); #if defined(MODULE_GCOAP) || defined(DOXYGEN) /** diff --git a/sys/net/application_layer/nanocoap/nanocoap.c b/sys/net/application_layer/nanocoap/nanocoap.c index 08af915cd0..e6c3bb3498 100644 --- a/sys/net/application_layer/nanocoap/nanocoap.c +++ b/sys/net/application_layer/nanocoap/nanocoap.c @@ -184,7 +184,7 @@ int coap_parse(coap_pkt_t *pkt, uint8_t *buf, size_t len) return 0; } -int coap_match_path(const coap_resource_t *resource, uint8_t *uri) +int coap_match_path(const coap_resource_t *resource, const uint8_t *uri) { assert(resource && uri); int res;