Merge 7.0 commit 'ca9c95' into PSI-7.0

This commit is contained in:
2023-12-01 14:21:07 +01:00
35 changed files with 446 additions and 296 deletions

View File

@@ -72,7 +72,7 @@ static void trans ( MAC_HANDLE *handle, MAC_ENTRY *entry, int level,
static void refer ( MAC_HANDLE *handle, MAC_ENTRY *entry, int level,
const char **rawval, char **value, char *valend );
static void cpy2val( const char *src, char **value, char *valend );
static void cpy2val( const char *src, char **value, const char *valend );
static char *Strdup( const char *string );
@@ -948,8 +948,6 @@ static void trans( MAC_HANDLE *handle, MAC_ENTRY *entry, int level,
still there to be seen) */
*rawval = ( *r == '\0' ) ? r - 1 : r;
*value = v;
return;
}
/*
@@ -1110,14 +1108,13 @@ cleanup:
*rawval = r;
*value = v;
return;
}
/*
* Copy a string, honoring the 'end of destination string' pointer
* Returns with **value pointing to the '\0' terminator
*/
static void cpy2val(const char *src, char **value, char *valend)
static void cpy2val(const char *src, char **value, const char *valend)
{
char *v = *value;
while ((v < valend) && (*v = *src++)) { v++; }