mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-11 00:30:00 -04:00
Changed API for omapi_string_totext; the string was not always
nul-terminated, so now the function sets a region instead.
This commit is contained in:
parent
eb91bcf9c8
commit
ae47947fdb
1 changed files with 6 additions and 5 deletions
|
|
@ -15,7 +15,7 @@
|
|||
* SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: string.c,v 1.2 2000/01/28 05:22:02 marka Exp $ */
|
||||
/* $Id: string.c,v 1.3 2000/01/31 14:58:11 tale Exp $ */
|
||||
|
||||
/* Principal Author: Ted Lemon */
|
||||
|
||||
|
|
@ -62,11 +62,12 @@ omapi_string_dereference(omapi_string_t **h) {
|
|||
*h = NULL;
|
||||
}
|
||||
|
||||
char *
|
||||
omapi_string_totext(omapi_string_t *string) {
|
||||
ENSURE(string->value[string->len] == '\0');
|
||||
void
|
||||
omapi_string_totext(omapi_string_t *string, isc_region_t *region) {
|
||||
REQUIRE(string != NULL && region != NULL);
|
||||
|
||||
return ((char *)string->value);
|
||||
region->base = string->value;
|
||||
region->length = string->len;
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
|||
Loading…
Reference in a new issue