Print this page
locale stuff should use libc safe lmalloc. Other fixes from tests.
*** 31,40 ****
--- 31,41 ----
#include <stddef.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
+ #include "libc.h"
#include "ldpart.h"
#include "lmonetary.h"
#include "localeimpl.h"
extern const char *__fix_locale_grouping_str(const char *);
*** 109,121 ****
return (NULL);
}
/* special storage for currency string */
clen = strlen(lmon->currency_symbol) + 2;
! ldata->l_data[2] = malloc(clen);
lmon->crncystr = ldata->l_data[2];
- lmon->crncystr[0] = '\0';
lmon->mon_grouping = __fix_locale_grouping_str(lmon->mon_grouping);
#define M_ASSIGN_CHAR(NAME) \
(((char *)lmon->NAME)[0] = cnv(lmon->NAME))
--- 110,121 ----
return (NULL);
}
/* special storage for currency string */
clen = strlen(lmon->currency_symbol) + 2;
! ldata->l_data[2] = libc_malloc(clen);
lmon->crncystr = ldata->l_data[2];
lmon->mon_grouping = __fix_locale_grouping_str(lmon->mon_grouping);
#define M_ASSIGN_CHAR(NAME) \
(((char *)lmon->NAME)[0] = cnv(lmon->NAME))