diff options
| author | Kirk McKusick <mckusick@FreeBSD.org> | 2026-08-17 19:15:09 +0000 |
|---|---|---|
| committer | Kirk McKusick <mckusick@FreeBSD.org> | 2026-08-17 19:15:09 +0000 |
| commit | 2cefae4cf34e7d39fc3b27358d7d66a96b3b0056 (patch) | |
| tree | 23e2e81d72cc2f5c3050ab544dd957b80011e679 | |
| parent | 2d67765f10e7da43ba2d4a7fc074c15d5354684b (diff) | |
Fix transposed arguments in call to calloc(). Reported by GCC 15 warning.
No functional change intended.
Submitted by: Pedro Giffuni <pfg@freebsd.org>
MFC-after: 1 week
| -rw-r--r-- | sbin/restore/symtab.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/restore/symtab.c b/sbin/restore/symtab.c index 3ae6bf20c7be..840ff54b0428 100644 --- a/sbin/restore/symtab.c +++ b/sbin/restore/symtab.c @@ -545,7 +545,7 @@ initsymtable(char *filename) panic("cannot stat symbol table file %s\n", filename); } tblsize = stbuf.st_size - sizeof(struct symtableheader); - base = calloc(sizeof(char), (unsigned)tblsize); + base = calloc((size_t)tblsize, sizeof(char)); if (base == NULL) panic("cannot allocate space for symbol table\n"); if (read(fd, base, (int)tblsize) < 0 || |
