aboutsummaryrefslogtreecommitdiff
path: root/locale/programs
diff options
context:
space:
mode:
Diffstat (limited to 'locale/programs')
-rw-r--r--locale/programs/ld-ctype.c5
-rw-r--r--locale/programs/locale.c3
2 files changed, 5 insertions, 3 deletions
diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c
index 0a5e4eebf1..f2ad46f092 100644
--- a/locale/programs/ld-ctype.c
+++ b/locale/programs/ld-ctype.c
@@ -492,8 +492,9 @@ ctype_output (struct localedef_t *locale, struct charset_t *charset,
else
{
iov[2 + elem + offset].iov_base = alloca ((total + 3) & ~3);
- memcpy (iov[2 + elem + offset].iov_base, ctype->codeset_name,
- total);
+ memset (mempcpy (iov[2 + elem + offset].iov_base,
+ ctype->codeset_name, total),
+ '\0', 4 - (total & 3));
total = (total + 3) & ~3;
}
iov[2 + elem + offset].iov_len = total;
diff --git a/locale/programs/locale.c b/locale/programs/locale.c
index e09e6f1e37..93818e02e2 100644
--- a/locale/programs/locale.c
+++ b/locale/programs/locale.c
@@ -657,7 +657,8 @@ show_info (const char *name)
break;
case word:
{
- unsigned int val = (unsigned int) nl_langinfo (item->item_id);
+ unsigned int val =
+ (unsigned int) (unsigned long int) nl_langinfo (item->item_id);
printf ("%d", val);
}
break;