]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Fix a stupid pasto in make_int_value. Add make_uint_value.
authorTed Lemon <source@isc.org>
Mon, 1 May 2000 23:52:05 +0000 (23:52 +0000)
committerTed Lemon <source@isc.org>
Mon, 1 May 2000 23:52:05 +0000 (23:52 +0000)
omapip/support.c

index 370427e7f256e2ed1a7167d56bffaf182a657712..99f449b9c2f51154e01e335b92cb9018526c2edb 100644 (file)
@@ -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,