X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_malloc%2Fmalloc_elem.h;h=1997109e2383665bfe55009041bbf30e3c44be52;hb=2609f702241c2bccf2671bfa6a9d6697ee0d6dd6;hp=247a23b97ff053de66d51db7fb943ef7c944f313;hpb=57c24af85d9eaa81549a212169605b4e2468a29f;p=dpdk.git diff --git a/lib/librte_malloc/malloc_elem.h b/lib/librte_malloc/malloc_elem.h index 247a23b97f..1997109e23 100644 --- a/lib/librte_malloc/malloc_elem.h +++ b/lib/librte_malloc/malloc_elem.h @@ -61,7 +61,7 @@ static const unsigned MALLOC_ELEM_TRAILER_LEN = 0; /* dummy function - just check if pointer is non-null */ static inline int -malloc_elem_cookies_ok(struct malloc_elem *elem){ return elem != NULL; } +malloc_elem_cookies_ok(const struct malloc_elem *elem){ return elem != NULL; } /* dummy function - no header if malloc_debug is not enabled */ static inline void @@ -99,7 +99,7 @@ set_trailer(struct malloc_elem *elem) /* check that the header and trailer cookies are set correctly */ static inline int -malloc_elem_cookies_ok(struct malloc_elem *elem) +malloc_elem_cookies_ok(const struct malloc_elem *elem) { return (elem != NULL && MALLOC_ELEM_HEADER(elem) == MALLOC_HEADER_COOKIE && @@ -116,7 +116,7 @@ static const unsigned MALLOC_ELEM_HEADER_LEN = sizeof(struct malloc_elem); * the actual malloc_elem header for that block. */ static inline struct malloc_elem * -malloc_elem_from_data(void *data) +malloc_elem_from_data(const void *data) { if (data == NULL) return NULL;