Commit 294f39b084fde876f9974c967dd7c002a4e8b07b

Stefan Sperling 2018-11-05T18:14:37

no need to zero new idset elements during allocation

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/lib/object_idset.c b/lib/object_idset.c
index d611952..bcfd309 100644
--- a/lib/object_idset.c
+++ b/lib/object_idset.c
@@ -97,7 +97,7 @@ got_object_idset_add(struct got_object_idset *set, struct got_object_id *id,
 	if (set->totelem >= GOT_OBJECT_IDSET_MAX_ELEM)
 		return got_error(GOT_ERR_NO_SPACE);
 
-	new = calloc(1, sizeof(*new));
+	new = malloc(sizeof(*new));
 	if (new == NULL)
 		return got_error_from_errno();