mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
465. [cleanup] Allow 0 to be set as an omapi_value_t value by
omapi_value_storeint(). (Arguably this is was a bug, arguably it wasn't. I do not know Ted's original intent, but I believe it cleans up the API to allow 0 to be set and retrieved just as any other int is.)o (Also arguably, the other omapi_value_store*() functions should instead be creating non-NULL omapi_value_t->value pointers when they are setting NULL values, and then assigning NULL into the relevant union member.)
This commit is contained in:
4
CHANGES
4
CHANGES
@@ -1,5 +1,7 @@
|
|||||||
|
465. [cleanup] Allow 0 to be set as an omapi_value_t value by
|
||||||
|
omapi_value_storeint().
|
||||||
|
|
||||||
464. [cleanup] build with openssl's RSA code instead of dnssafe
|
464. [cleanup] Build with openssl's RSA code instead of dnssafe.
|
||||||
|
|
||||||
463. [bug] nsupdate sent malformed SOA queries to the second
|
463. [bug] nsupdate sent malformed SOA queries to the second
|
||||||
and subsequent name servers in resolv.conf if the
|
and subsequent name servers in resolv.conf if the
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: value.c,v 1.9 2000/08/01 01:33:02 tale Exp $ */
|
/* $Id: value.c,v 1.10 2000/09/16 03:20:54 tale Exp $ */
|
||||||
|
|
||||||
/* Principal Author: Ted Lemon */
|
/* Principal Author: Ted Lemon */
|
||||||
|
|
||||||
@@ -110,8 +110,7 @@ omapi_value_storemem(omapi_value_t **vp, omapi_string_t *name,
|
|||||||
}
|
}
|
||||||
|
|
||||||
isc_result_t
|
isc_result_t
|
||||||
omapi_value_storeint(omapi_value_t **vp, omapi_string_t *name, int value)
|
omapi_value_storeint(omapi_value_t **vp, omapi_string_t *name, int value) {
|
||||||
{
|
|
||||||
isc_result_t result;
|
isc_result_t result;
|
||||||
|
|
||||||
result = omapi_value_create(vp);
|
result = omapi_value_create(vp);
|
||||||
@@ -120,12 +119,10 @@ omapi_value_storeint(omapi_value_t **vp, omapi_string_t *name, int value)
|
|||||||
|
|
||||||
omapi_string_reference(&(*vp)->name, name);
|
omapi_string_reference(&(*vp)->name, name);
|
||||||
|
|
||||||
if (value != 0) {
|
|
||||||
result = omapi_data_create(&(*vp)->value, omapi_datatype_int);
|
result = omapi_data_create(&(*vp)->value, omapi_datatype_int);
|
||||||
|
|
||||||
if (result == ISC_R_SUCCESS)
|
if (result == ISC_R_SUCCESS)
|
||||||
(*vp)->value->u.integer = value;
|
(*vp)->value->u.integer = value;
|
||||||
}
|
|
||||||
|
|
||||||
if (result != ISC_R_SUCCESS)
|
if (result != ISC_R_SUCCESS)
|
||||||
omapi_value_dereference(vp);
|
omapi_value_dereference(vp);
|
||||||
|
Reference in New Issue
Block a user