From: Arran Cudbard-Bell Date: Fri, 17 Jun 2022 21:39:23 +0000 (-0500) Subject: subs should be mutable X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0271a7fd24065c6daf6a20c3e6af38670261b1d3;p=thirdparty%2Ffreeradius-server.git subs should be mutable --- diff --git a/src/lib/util/sbuff.h b/src/lib/util/sbuff.h index efa235e853f..874c0d6211a 100644 --- a/src/lib/util/sbuff.h +++ b/src/lib/util/sbuff.h @@ -38,11 +38,6 @@ extern "C" { #include #include -#include -#include -#include -#include - /** Represents number of bytes parsed or location of parse error * * Number of bytes parsed will be >= 0. @@ -56,9 +51,13 @@ extern "C" { typedef ssize_t fr_slen_t; typedef struct fr_sbuff_s fr_sbuff_t; typedef struct fr_sbuff_ptr_s fr_sbuff_marker_t; - typedef size_t(*fr_sbuff_extend_t)(fr_sbuff_t *sbuff, size_t req_extenison); +#include +#include +#include +#include + struct fr_sbuff_ptr_s { union { char const *p_i; //!< Immutable position pointer. @@ -175,7 +174,7 @@ typedef struct { char const *name; //!< Name for rule set to aid we debugging. char chr; //!< Character at the start of an escape sequence. - char const subs[UINT8_MAX + 1]; //!< Special characters and their substitutions. + char subs[UINT8_MAX + 1]; //!< Special characters and their substitutions. ///< Indexed by the printable representation i.e. ///< 'n' for \n. bool skip[UINT8_MAX + 1]; //!< Characters that are escaped, but left in the @@ -197,7 +196,7 @@ typedef struct { char chr; //!< Character at the start of an escape sequence. - char const subs[UINT8_MAX + 1]; //!< Special characters and their substitutions. + char subs[UINT8_MAX + 1]; //!< Special characters and their substitutions. ///< Indexed by the binary representation i.e. ///< 0x0a for \n. bool esc[UINT8_MAX + 1]; //!< Characters that should be translated to hex or