From 8a093dade331ca073d1f487de61710774a5de8c6 Mon Sep 17 00:00:00 2001 From: "Andrey A. Chernov" Date: Sat, 12 Oct 2002 11:31:07 +0000 Subject: [PATCH] Cosmetic: use LCMONETARY_SIZE_{FULL,MIN} defines like in other places --- lib/libc/locale/lmonetary.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/libc/locale/lmonetary.c b/lib/libc/locale/lmonetary.c index ad751f27ee6a..1e35bf00fd12 100644 --- a/lib/libc/locale/lmonetary.c +++ b/lib/libc/locale/lmonetary.c @@ -36,7 +36,10 @@ __FBSDID("$FreeBSD$"); extern int __mlocale_changed; extern const char * __fix_locale_grouping_str(const char *); -#define LCMONETARY_SIZE (sizeof(struct lc_monetary_T) / sizeof(char *)) +#define LCMONETARY_SIZE_FULL (sizeof(struct lc_monetary_T) / sizeof(char *)) +#define LCMONETARY_SIZE_MIN \ + (offsetof(struct lc_monetary_T, int_p_cs_precedes) / \ + sizeof(char *)) static char empty[] = ""; static char numempty[] = { CHAR_MAX, '\0'}; @@ -86,9 +89,7 @@ __monetary_load_locale(const char *name) ret = __part_load_locale(name, &_monetary_using_locale, _monetary_locale_buf, "LC_MONETARY", - LCMONETARY_SIZE, - offsetof(struct lc_monetary_T, int_p_cs_precedes) / - sizeof(char *), + LCMONETARY_SIZE_FULL, LCMONETARY_SIZE_MIN, (const char **)&_monetary_locale); if (ret != _LDP_ERROR) __mlocale_changed = 1;