mirror of
https://github.com/opnsense/src.git
synced 2026-06-11 01:30:30 -04:00
ctld: Consistently use item count as the first argument to calloc
Reported by: GCC 14 -Wcalloc-transposed-args
Reviewed by: rlibby, imp, emaste
Differential Revision: https://reviews.freebsd.org/D46013
(cherry picked from commit 2ba12978f6)
This commit is contained in:
parent
c28d88cda4
commit
57be21fae0
1 changed files with 2 additions and 2 deletions
|
|
@ -49,14 +49,14 @@ isns_req_alloc(void)
|
|||
{
|
||||
struct isns_req *req;
|
||||
|
||||
req = calloc(sizeof(struct isns_req), 1);
|
||||
req = calloc(1, sizeof(struct isns_req));
|
||||
if (req == NULL) {
|
||||
log_err(1, "calloc");
|
||||
return (NULL);
|
||||
}
|
||||
req->ir_buflen = sizeof(struct isns_hdr);
|
||||
req->ir_usedlen = 0;
|
||||
req->ir_buf = calloc(req->ir_buflen, 1);
|
||||
req->ir_buf = calloc(1, req->ir_buflen);
|
||||
if (req->ir_buf == NULL) {
|
||||
free(req);
|
||||
log_err(1, "calloc");
|
||||
|
|
|
|||
Loading…
Reference in a new issue