Merge pull request #34025 from YHNdnzj/edit-util-wrong-place

edit-util: catch and warn about edits outside of markers
This commit is contained in:
Yu Watanabe
2024-08-19 04:33:56 +09:00
committed by GitHub
2 changed files with 28 additions and 6 deletions
+2 -2
View File
@@ -156,7 +156,7 @@ int ascii_strcasecmp_nn(const char *a, size_t n, const char *b, size_t m);
bool chars_intersect(const char *a, const char *b) _pure_;
static inline bool _pure_ in_charset(const char *s, const char* charset) {
static inline bool _pure_ in_charset(const char *s, const char *charset) {
assert(s);
assert(charset);
return s[strspn(s, charset)] == '\0';
@@ -248,7 +248,7 @@ REENABLE_WARNING;
/* Like startswith_no_case(), but operates on arbitrary memory blocks.
* It works only for ASCII strings.
*/
static inline void *memory_startswith_no_case(const void *p, size_t sz, const char *token) {
static inline void* memory_startswith_no_case(const void *p, size_t sz, const char *token) {
assert(token);
size_t n = strlen(token);