From: Ted Lemon Date: Mon, 1 May 2000 23:52:05 +0000 (+0000) Subject: Fix a stupid pasto in make_int_value. Add make_uint_value. X-Git-Tag: V3-BETA-2-PATCH-1~216 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e598929f6d359d2bae5ddacc9b8cdc6b3fe31550;p=thirdparty%2Fdhcp.git Fix a stupid pasto in make_int_value. Add make_uint_value. --- diff --git a/omapip/support.c b/omapip/support.c index 370427e7f..99f449b9c 100644 --- a/omapip/support.c +++ b/omapip/support.c @@ -608,18 +608,24 @@ isc_result_t omapi_make_int_value (omapi_value_t **vp, omapi_value_dereference (vp, file, line); return status; } - if (value) { - status = omapi_typed_data_new (file, line, &(*vp) -> value, - omapi_datatype_int); - if (status != ISC_R_SUCCESS) { - omapi_value_dereference (vp, file, line); - return status; - } - (*vp) -> value -> u.integer = value; + status = omapi_typed_data_new (file, line, &(*vp) -> value, + omapi_datatype_int); + if (status != ISC_R_SUCCESS) { + omapi_value_dereference (vp, file, line); + return status; } + (*vp) -> value -> u.integer = value; return ISC_R_SUCCESS; } +isc_result_t omapi_make_uint_value (omapi_value_t **vp, + omapi_data_string_t *name, + unsigned int value, + const char *file, int line) +{ + return omapi_make_int_value (vp, name, (int)value, file, line); +} + isc_result_t omapi_make_handle_value (omapi_value_t **vp, omapi_data_string_t *name, omapi_object_t *value,