From: Alan T. DeKok Date: Thu, 29 Dec 2022 19:12:09 +0000 (-0500) Subject: user-visible error messages shouldn't have function names in them X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=68018e55c200e54d86638f85ae07fdd3ea5a52e4;p=thirdparty%2Ffreeradius-server.git user-visible error messages shouldn't have function names in them --- diff --git a/src/lib/util/dict_util.c b/src/lib/util/dict_util.c index 7ff74ca3dd0..c622d024e6c 100644 --- a/src/lib/util/dict_util.c +++ b/src/lib/util/dict_util.c @@ -1359,7 +1359,7 @@ int dict_attr_enum_add_name(fr_dict_attr_t *da, char const *name, len = strlen(name); if (len >= FR_DICT_ENUM_MAX_NAME_LEN) { - fr_strerror_printf("%s: Value name too long", __FUNCTION__); + fr_strerror_printf("VALUE name is too long"); return -1; } @@ -1422,16 +1422,14 @@ int dict_attr_enum_add_name(fr_dict_attr_t *da, char const *name, if (da->type != value->type) { if (!coerce) { - fr_strerror_printf("%s: Type mismatch between attribute (%s) and enum (%s)", - __FUNCTION__, + fr_strerror_printf("Type mismatch between attribute (%s) and enum (%s)", fr_type_to_str(da->type), fr_type_to_str(value->type)); return -1; } if (fr_value_box_cast(enumv, enum_value, da->type, NULL, value) < 0) { - fr_strerror_printf_push("%s: Failed coercing enum type (%s) to attribute type (%s)", - __FUNCTION__, + fr_strerror_printf_push("Failed coercing enum type (%s) to attribute type (%s)", fr_type_to_str(value->type), fr_type_to_str(da->type));