for the odd case where we cast a pre-existing value-box from
a string, AND that string is zero length, the cast silently
succeeds BUT leaves the destination value-box as FR_TYPE_NULL
Which seems bad
/*
* Initialise dst
*/
- memset(dst, 0, sizeof(*dst));
+ fr_value_box_init(dst, dst_type, NULL, src->tainted);
/*
* Dispatch to specialised cast functions
return -1;
}
- memset(&tmp, 0, sizeof(tmp));
+ fr_value_box_init(&tmp, dst_type, NULL, false);
/*
* Copy the raw octets into the datum of a value_box