diff options
author | araujo <araujo@FreeBSD.org> | 2016-10-21 03:10:05 +0000 |
---|---|---|
committer | araujo <araujo@FreeBSD.org> | 2016-10-21 03:10:05 +0000 |
commit | 13d5943eb1c48958acff57c5b739063af9033b4d (patch) | |
tree | 5f7a76897f4c6e25429c89bcd196e8dee33a922b /usr.sbin | |
parent | b5d55a96cbc8a6e7f907443e2ded5383320ae62c (diff) | |
download | FreeBSD-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.sbin')
-rw-r--r-- | usr.sbin/ctld/chap.c | 4 | ||||
-rw-r--r-- | usr.sbin/ctld/keys.c | 2 | ||||
-rw-r--r-- | usr.sbin/ctld/pdu.c | 4 | ||||
-rw-r--r-- | usr.sbin/fifolog/lib/fifolog_int.c | 2 | ||||
-rw-r--r-- | usr.sbin/fifolog/lib/fifolog_reader.c | 2 | ||||
-rw-r--r-- | usr.sbin/iscsid/chap.c | 4 | ||||
-rw-r--r-- | usr.sbin/iscsid/keys.c | 2 | ||||
-rw-r--r-- | usr.sbin/iscsid/pdu.c | 4 |
8 files changed, 12 insertions, 12 deletions
diff --git a/usr.sbin/ctld/chap.c b/usr.sbin/ctld/chap.c index 2120350..bf61f05 100644 --- a/usr.sbin/ctld/chap.c +++ b/usr.sbin/ctld/chap.c @@ -232,7 +232,7 @@ chap_new(void) { struct chap *chap; - chap = calloc(sizeof(*chap), 1); + chap = calloc(1, sizeof(*chap)); if (chap == NULL) log_err(1, "calloc"); @@ -333,7 +333,7 @@ rchap_new(const char *secret) { struct rchap *rchap; - rchap = calloc(sizeof(*rchap), 1); + rchap = calloc(1, sizeof(*rchap)); if (rchap == NULL) log_err(1, "calloc"); diff --git a/usr.sbin/ctld/keys.c b/usr.sbin/ctld/keys.c index c2f1604..a3b12f0 100644 --- a/usr.sbin/ctld/keys.c +++ b/usr.sbin/ctld/keys.c @@ -43,7 +43,7 @@ keys_new(void) { struct keys *keys; - keys = calloc(sizeof(*keys), 1); + keys = calloc(1, sizeof(*keys)); if (keys == NULL) log_err(1, "calloc"); diff --git a/usr.sbin/ctld/pdu.c b/usr.sbin/ctld/pdu.c index be3598e..2d4fcc6 100644 --- a/usr.sbin/ctld/pdu.c +++ b/usr.sbin/ctld/pdu.c @@ -81,11 +81,11 @@ pdu_new(struct connection *conn) { struct pdu *pdu; - pdu = calloc(sizeof(*pdu), 1); + pdu = calloc(1, sizeof(*pdu)); if (pdu == NULL) log_err(1, "calloc"); - pdu->pdu_bhs = calloc(sizeof(*pdu->pdu_bhs), 1); + pdu->pdu_bhs = calloc(1, sizeof(*pdu->pdu_bhs)); if (pdu->pdu_bhs == NULL) log_err(1, "calloc"); diff --git a/usr.sbin/fifolog/lib/fifolog_int.c b/usr.sbin/fifolog/lib/fifolog_int.c index 9d3b437..f8aabdc 100644 --- a/usr.sbin/fifolog/lib/fifolog_int.c +++ b/usr.sbin/fifolog/lib/fifolog_int.c @@ -125,7 +125,7 @@ fifolog_int_open_i(struct fifolog_file *f, const char *fname, int mode) /* Initialize zlib handling */ - f->zs = calloc(sizeof *f->zs, 1); + f->zs = calloc(1, sizeof(*f->zs)); if (f->zs == NULL) return ("cannot malloc"); diff --git a/usr.sbin/fifolog/lib/fifolog_reader.c b/usr.sbin/fifolog/lib/fifolog_reader.c index 0dda672..e771f88 100644 --- a/usr.sbin/fifolog/lib/fifolog_reader.c +++ b/usr.sbin/fifolog/lib/fifolog_reader.c @@ -59,7 +59,7 @@ fifolog_reader_open(const char *fname) struct fifolog_reader *fr; int i; - fr = calloc(sizeof *fr, 1); + fr = calloc(1, sizeof(*fr)); if (fr == NULL) err(1, "Cannot malloc"); diff --git a/usr.sbin/iscsid/chap.c b/usr.sbin/iscsid/chap.c index 30c1cd4..f6b51d7 100644 --- a/usr.sbin/iscsid/chap.c +++ b/usr.sbin/iscsid/chap.c @@ -232,7 +232,7 @@ chap_new(void) { struct chap *chap; - chap = calloc(sizeof(*chap), 1); + chap = calloc(1, sizeof(*chap)); if (chap == NULL) log_err(1, "calloc"); @@ -333,7 +333,7 @@ rchap_new(const char *secret) { struct rchap *rchap; - rchap = calloc(sizeof(*rchap), 1); + rchap = calloc(1, sizeof(*rchap)); if (rchap == NULL) log_err(1, "calloc"); diff --git a/usr.sbin/iscsid/keys.c b/usr.sbin/iscsid/keys.c index 8ac4788..4126bee 100644 --- a/usr.sbin/iscsid/keys.c +++ b/usr.sbin/iscsid/keys.c @@ -43,7 +43,7 @@ keys_new(void) { struct keys *keys; - keys = calloc(sizeof(*keys), 1); + keys = calloc(1, sizeof(*keys)); if (keys == NULL) log_err(1, "calloc"); diff --git a/usr.sbin/iscsid/pdu.c b/usr.sbin/iscsid/pdu.c index 78aa065..4222446 100644 --- a/usr.sbin/iscsid/pdu.c +++ b/usr.sbin/iscsid/pdu.c @@ -81,11 +81,11 @@ pdu_new(struct connection *conn) { struct pdu *pdu; - pdu = calloc(sizeof(*pdu), 1); + pdu = calloc(1, sizeof(*pdu)); if (pdu == NULL) log_err(1, "calloc"); - pdu->pdu_bhs = calloc(sizeof(*pdu->pdu_bhs), 1); + pdu->pdu_bhs = calloc(1, sizeof(*pdu->pdu_bhs)); if (pdu->pdu_bhs == NULL) log_err(1, "calloc"); |