From 7a18c6a2887b542896a2a0242189e7035155f0d5 Mon Sep 17 00:00:00 2001 From: Christopher Faulet Date: Thu, 22 Oct 2020 14:37:12 +0200 Subject: MINOR: ist: Add istend() function to return a pointer to the end of the string istend() is a shortcut to istptr() + istlen(). (cherry picked from commit cf26623780bdd66f4fff4154d0e5081082aff89b) [wt: needed for next fix] Signed-off-by: Willy Tarreau (cherry picked from commit b12ab9c04a896a90383dbaf5c808a6d9a26cde98) Signed-off-by: Willy Tarreau (cherry picked from commit 7a62a17abd2cc6f14a3cca47043db0061e2f6664) Signed-off-by: Willy Tarreau --- include/common/ist.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/common/ist.h b/include/common/ist.h index 5eb8bf23b..fbbfcbef7 100644 --- a/include/common/ist.h +++ b/include/common/ist.h @@ -119,6 +119,12 @@ static inline size_t istlen(const struct ist ist) return ist.len; } +/* returns the pointer to the end the string */ +static inline char *istend(const struct ist ist) +{ + return (ist.ptr + ist.len); +} + /* skips to next character in the string, always stops at the end */ static inline struct ist istnext(const struct ist ist) { -- 2.35.3