summaryrefslogtreecommitdiffstats
path: root/usr.bin/localedef
diff options
context:
space:
mode:
authoraraujo <araujo@FreeBSD.org>2016-10-21 03:10:05 +0000
committeraraujo <araujo@FreeBSD.org>2016-10-21 03:10:05 +0000
commit13d5943eb1c48958acff57c5b739063af9033b4d (patch)
tree5f7a76897f4c6e25429c89bcd196e8dee33a922b /usr.bin/localedef
parentb5d55a96cbc8a6e7f907443e2ded5383320ae62c (diff)
downloadFreeBSD-src-13d5943eb1c48958acff57c5b739063af9033b4d.zip
FreeBSD-src-13d5943eb1c48958acff57c5b739063af9033b4d.tar.gz
MFC r303541, r303542, r303543, r303545, r303546, r303547, r304225, r304226, r304605, r304676, r305212, r305863:
r303541: Use nitems() from sys/param.h. Sponsored by: gandi.net (BSD Day Taiwan) MFC after: 2 weeks. r303542: Use nitems() from sys/param.h. MFC after: 2 weeks. Sponsored by: gandi.net (BSD Day Taiwan) r303543: Use nitems() from sys/param.h. MFC after: 2 weeks. Sponsored by: gandi.net (BSD Day Taiwan) r303545: Use nitems() from sys/param.h. MFC after: 2 weeks. Sponsored by: gandi.net (BSD Day Taiwan) r303546: Use nitems() from sys/param.h. MFC after: 2 weeks. Sponsored by: gandi.net (BSD Day Taiwan) r303547: Use nitems() from sys/param.h. MFC after: 2 weeks. Sponsored by: gandi.net (BSD Day Taiwan) r304225: Use nitems() from sys/param.h. MFC after: 2 weeks. r304226: Use nitems() from sys/param.h. MFC after: 2 weeks. r304605: Fix calloc(3) argument order. Reviewed by: trasz MFC after: 4 weeks. Differential Revision: https://reviews.freebsd.org/D7532 r304676: Fix calloc(3) argument order. MFC after: 4 weeks. r305212: - Invert calloc(3) argument order. MFC after: 4 weeks r305863: Invert calloc(3) argument order. Reviewed by: ed. MFC after: 4 weeks. Differential Revision: https://reviews.freebsd.org/D7902
Diffstat (limited to 'usr.bin/localedef')
-rw-r--r--usr.bin/localedef/collate.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/localedef/collate.c b/usr.bin/localedef/collate.c
index 63dd4c7..7890538 100644
--- a/usr.bin/localedef/collate.c
+++ b/usr.bin/localedef/collate.c
@@ -490,7 +490,7 @@ define_collsym(char *name)
{
collsym_t *sym;
- if ((sym = calloc(sizeof (*sym), 1)) == NULL) {
+ if ((sym = calloc(1, sizeof(*sym))) == NULL) {
fprintf(stderr,"out of memory");
return;
}
@@ -536,7 +536,7 @@ get_collundef(char *name)
srch.name = name;
if ((ud = RB_FIND(collundefs, &collundefs, &srch)) == NULL) {
- if (((ud = calloc(sizeof (*ud), 1)) == NULL) ||
+ if (((ud = calloc(1, sizeof(*ud))) == NULL) ||
((ud->name = strdup(name)) == NULL)) {
fprintf(stderr,"out of memory");
free(ud);
@@ -561,7 +561,7 @@ get_collchar(wchar_t wc, int create)
srch.wc = wc;
cc = RB_FIND(collchars, &collchars, &srch);
if ((cc == NULL) && create) {
- if ((cc = calloc(sizeof (*cc), 1)) == NULL) {
+ if ((cc = calloc(1, sizeof(*cc))) == NULL) {
fprintf(stderr, "out of memory");
return (NULL);
}
@@ -793,7 +793,7 @@ define_collelem(char *name, wchar_t *wcs)
return;
}
- if ((e = calloc(sizeof (*e), 1)) == NULL) {
+ if ((e = calloc(1, sizeof(*e))) == NULL) {
fprintf(stderr, "out of memory");
return;
}
@@ -927,7 +927,7 @@ add_order_subst(void)
s = RB_FIND(substs_ref, &substs_ref[curr_weight], &srch);
if (s == NULL) {
- if ((s = calloc(sizeof (*s), 1)) == NULL) {
+ if ((s = calloc(1, sizeof(*s))) == NULL) {
fprintf(stderr,"out of memory");
return;
}
@@ -1035,7 +1035,7 @@ add_weight(int32_t ref, int pass)
if (RB_FIND(weights, &weights[pass], &srch) != NULL)
return;
- if ((w = calloc(sizeof (*w), 1)) == NULL) {
+ if ((w = calloc(1, sizeof(*w))) == NULL) {
fprintf(stderr, "out of memory");
return;
}
OpenPOWER on IntegriCloud