Throw const on some strings

In C, const indicates to the reader that mutation will not occur.
It can also serve as a hint about ownership.

Add const in a few places where it makes sense.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <freqlabs@FreeBSD.org>
Closes #10997
This commit is contained in:
Ryan Moeller
2020-10-02 20:44:10 -04:00
committed by GitHub
parent 5b525165e9
commit 4d55ea811d
20 changed files with 99 additions and 108 deletions
+1 -1
View File
@@ -330,7 +330,7 @@ const uint8_t u8_valid_max_2nd_byte[0x100] = {
* specific to UTF-8 and Unicode.
*/
int
u8_validate(char *u8str, size_t n, char **list, int flag, int *errnum)
u8_validate(const char *u8str, size_t n, char **list, int flag, int *errnum)
{
uchar_t *ib;
uchar_t *ibtail;