summaryrefslogtreecommitdiff
path: root/cvs-fast-export/0003-xalloc.xmalloc-argument-cleanup.patch
blob: 4554d5c2330c289a842185c52d5dea45b834ae93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
From 93d2ed1814d2c9e8425ba318c81c36db5ff4b58f Mon Sep 17 00:00:00 2001
From: "Eric S. Raymond" <esr@thyrsus.com>
Date: Tue, 15 Oct 2024 14:06:43 -0400
Subject: [PATCH 3/4] xalloc.xmalloc argument cleanup.

Problems reveaked by -Werror.
---
 import.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/import.c b/import.c
index 15f1134..2a13c09 100644
--- a/import.c
+++ b/import.c
@@ -410,8 +410,8 @@ void analyze_masters(int argc, const char *argv[], import_options_t *analyzer,
 	}
 	forest->filecount = total_files;
 
-	generators = xcalloc(sizeof(generator_t), total_files, "Generators");
-	sorted_files = xmalloc(sizeof(rev_file) * total_files, "sorted_files");
+	generators = xcalloc(total_files, sizeof(generator_t), "Generators");
+	sorted_files = xcalloc(total_files, sizeof(rev_file), "sorted_files");
 	cvs_masters = xcalloc(total_files, sizeof(cvs_master), "cvs_masters");
 	rev_masters = xmalloc(sizeof(rev_master) * total_files, "rev_masters");
 	fn_n = total_files;
-- 
2.47.1