From: Christopher Faulet Date: Thu, 22 Oct 2020 12:37:12 +0000 (+0200) Subject: MINOR: ist: Add istend() function to return a pointer to the end of the string X-Git-Tag: archive/raspbian/2.2.9-2+rpi1+deb11u6^2~7 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=54a5b273aa636f32e4cd5960410afaa4c71bf88c;p=haproxy.git MINOR: ist: Add istend() function to return a pointer to the end of the string Origin: https://git.haproxy.org/?p=haproxy-2.2.git;a=commit;h=b12ab9c04a896a90383dbaf5c808a6d9a26cde98 istend() is a shortcut to istptr() + istlen(). (cherry picked from commit cf26623780bdd66f4fff4154d0e5081082aff89b) [wt: needed for next fix] Signed-off-by: Willy Tarreau Gbp-Pq: Name MINOR-ist-Add-istend-function-to-return-a-pointer-to.patch --- diff --git a/include/import/ist.h b/include/import/ist.h index 7bfad72..abb6151 100644 --- a/include/import/ist.h +++ b/include/import/ist.h @@ -222,6 +222,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) {