Cleanup: the characters from Regexp field are all unsigned and use unsigned char instead.
From 0eac3b986972b2888ebf386642c1d281344aba91 Mon Sep 17 00:00:00 2001
From: renmingshuai <renmingshuai@huawei.com>
Date: Tue, 5 Mar 2024 09:49:01 +0800
Subject: [PATCH] Cleanup: the characters from Regexp field are all unsinged.
Use unsigned char instead.
Signed-off-by: renmingshuai <renmingshuai@huawei.com>
---
lib/dns/rdata/generic/naptr_35.c | 4 ++--
lib/isc/regex.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/dns/rdata/generic/naptr_35.c b/lib/dns/rdata/generic/naptr_35.c
index ecae2c0ca3..abc1e41101 100644
--- a/lib/dns/rdata/generic/naptr_35.c
+++ b/lib/dns/rdata/generic/naptr_35.c
@@ -25,8 +25,8 @@
static inline isc_result_t
txt_valid_regex(const unsigned char *txt) {
unsigned int nsub = 0;
- char regex[256];
- char *cp;
+ unsigned char regex[256];
+ unsigned char *cp;
bool flags = false;
bool replace = false;
unsigned char c;
diff --git a/lib/isc/regex.c b/lib/isc/regex.c
index 99809cc244..eb01c7d4d9 100644
--- a/lib/isc/regex.c
+++ b/lib/isc/regex.c
@@ -28,7 +28,7 @@
* Validate the regular expression 'C' locale.
*/
int
-isc_regex_validate(const char *c) {
+isc_regex_validate(const unsigned char *c) {
enum {
none, parse_bracket, parse_bound,
parse_ce, parse_ec, parse_cc
--
2.33.0
Edited by Mingshuai Ren