break
+static inline int fr_value_box_cast_unsupported(fr_type_t dst, fr_type_t src)
+{
+ fr_strerror_printf("Invalid cast from %s to %s. Unsupported",
+ fr_type_to_str(src),
+ fr_type_to_str(dst));
+ return -1;
+}
+
+
/** Convert any supported type to an IPv4 address
*
* Allowed input types are:
break;
default:
- fr_strerror_printf("Invalid cast from %s to %s. Unsupported",
- fr_type_to_str(src->type),
- fr_type_to_str(dst_type));
- return -1;
+ return fr_value_box_cast_unsupported(dst_type, src->type);
}
return 0;
}
default:
- fr_strerror_printf("Invalid cast from %s to %s. Unsupported",
- fr_type_to_str(src->type),
- fr_type_to_str(dst_type));
- return -1;
+ return fr_value_box_cast_unsupported(dst_type, src->type);
}
return 0;
break;
default:
- fr_strerror_printf("Invalid cast from %s to %s. Unsupported",
- fr_type_to_str(src->type),
- fr_type_to_str(dst_type));
- break;
+ return fr_value_box_cast_unsupported(dst_type, src->type);
}
return 0;
break;
default:
- fr_strerror_printf("Invalid cast from %s to %s. Unsupported",
- fr_type_to_str(src->type),
- fr_type_to_str(dst_type));
- return -1;
+ return fr_value_box_cast_unsupported(dst_type, src->type);
}
return 0;
}
}
default:
- fr_strerror_printf("Invalid cast from %s to %s. Unsupported",
- fr_type_to_str(src->type),
- fr_type_to_str(dst_type));
- return -1;
+ return fr_value_box_cast_unsupported(dst_type, src->type);
}
return 0;
break;
default:
- fr_strerror_printf("Invalid cast from %s to %s. Unsupported",
- fr_type_to_str(src->type),
- fr_type_to_str(dst_type));
- return -1;
+ return fr_value_box_cast_unsupported(dst_type, src->type);
}
return 0;
}
bad_cast:
- fr_strerror_printf("Invalid cast from %s to %s. Unsupported",
- fr_type_to_str(src->type),
- fr_type_to_str(dst_type));
- return -1;
+ return fr_value_box_cast_unsupported(dst_type, src->type);
}
/** Convert any value to a floating point value
}
bad_cast:
- fr_strerror_printf("Invalid cast from %s to %s. Unsupported",
- fr_type_to_str(src->type),
- fr_type_to_str(dst_type));
- return -1;
+ return fr_value_box_cast_unsupported(dst_type, src->type);
}