*/
#include <freeradius-devel/redis/base.h>
#include <freeradius-devel/util/debug.h>
+#include <freeradius-devel/util/value.h>
fr_table_num_sorted_t const redis_reply_types[] = {
{ L("array"), REDIS_REPLY_ARRAY },
fr_value_box_t *to_cast;
if (dst_type != FR_TYPE_VOID) {
- fr_value_box_copy_unsafe(&in, &(fr_value_box_t){});
+ fr_value_box_init_null(&in);
to_cast = ∈
} else {
to_cast = out;
const fr_value_box_t *src)
CC_HINT(nonnull(2,3));
-/*
- * fr_value_box_copy_unsafe() copies the raw bytes from one value box
- * to another. Its uses are rare.
- */
-static inline CC_HINT(nonnull, always_inline)
-void fr_value_box_copy_unsafe(fr_value_box_t *dst, const fr_value_box_t *src)
-{
- /* coverity[store_writes_const_field] */
- memcpy(dst, src, sizeof(*dst));
-}
-
int fr_value_box_steal(TALLOC_CTX *ctx, fr_value_box_t *dst, fr_value_box_t *src)
CC_HINT(nonnull(2,3));
/** @} */
static inline CC_HINT(nonnull(1), always_inline)
void fr_value_box_init(fr_value_box_t *vb, fr_type_t type, fr_dict_attr_t const *enumv, bool tainted)
{
- fr_value_box_copy_unsafe(vb, &(fr_value_box_t){
- .type = type,
- .enumv = enumv,
- .tainted = tainted
- });
+ memcpy(vb, &(fr_value_box_t){
+ .type = type,
+ .enumv = enumv,
+ .tainted = tainted
+ }, sizeof(*vb));
fr_value_box_list_entry_init(vb);
/*
* @copyright 2012-2021 Arran Cudbard-Bell (a.cudbardb@freeradius.org)
*/
+
RCSID("$Id$")
#define LOG_PREFIX mctx->inst->name
#include <freeradius-devel/server/base.h>
#include <freeradius-devel/server/pool.h>
#include <freeradius-devel/unlang/call.h>
+#include <freeradius-devel/unlang/value.h>
#include "rest.h"
return NULL;
}
- fr_value_box_copy_unsafe(&src, &(fr_value_box_t){});
+ fr_value_box_init_null(&src);
switch (json_object_get_type(leaf)) {
case json_type_int: