diff --git a/archival/dpkg.c b/archival/dpkg.c
index 637afce..28913d2 100644
--- a/archival/dpkg.c
+++ b/archival/dpkg.c
@@ -382,9 +382,8 @@
  */
 static void add_edge_to_node(common_node_t *node, edge_t *edge)
 {
-	node->num_of_edges++;
-	node->edge = xrealloc(node->edge, sizeof(edge_t) * (node->num_of_edges + 1));
-	node->edge[node->num_of_edges - 1] = edge;
+	node->edge = xrealloc_vector(node->edge, 2, node->num_of_edges);
+	node->edge[node->num_of_edges++] = edge;
 }
 
 /*
@@ -972,7 +971,7 @@
 	 * installed package for conflicts*/
 	while (deb_file[i] != NULL) {
 		const unsigned package_num = deb_file[i]->package;
-		conflicts = xrealloc(conflicts, sizeof(int) * (conflicts_num + 1));
+		conflicts = xrealloc_vector(conflicts, 2, conflicts_num);
 		conflicts[conflicts_num] = package_num;
 		conflicts_num++;
 		/* add provides to conflicts list */
@@ -989,7 +988,7 @@
 					new_node->version = package_hashtable[package_num]->edge[j]->version;
 					package_hashtable[conflicts_package_num] = new_node;
 				}
-				conflicts = xrealloc(conflicts, sizeof(int) * (conflicts_num + 1));
+				conflicts = xrealloc_vector(conflicts, 2, conflicts_num);
 				conflicts[conflicts_num] = conflicts_package_num;
 				conflicts_num++;
 			}
@@ -1170,7 +1169,8 @@
 	file_list = NULL;
 	count = 0;
 	while ((line = xmalloc_fgetline(list_stream)) != NULL) {
-		file_list = xrealloc(file_list, sizeof(char *) * (count + 2));
+//TODO: zeroing xrealloc_vector? 
+		file_list = xrealloc_vector(file_list, 2, count);
 		file_list[count++] = line;
 		file_list[count] = NULL;
 	}
@@ -1634,7 +1634,7 @@
 	/* Read arguments and store relevant info in structs */
 	while (*argv) {
 		/* deb_count = nb_elem - 1 and we need nb_elem + 1 to allocate terminal node [NULL pointer] */
-		deb_file = xrealloc(deb_file, sizeof(deb_file[0]) * (deb_count + 2));
+		deb_file = xrealloc_vector(deb_file, 2, deb_count);
 		deb_file[deb_count] = xzalloc(sizeof(deb_file[0][0]));
 		if (opt & (OPT_install | OPT_unpack)) {
 			/* -i/-u: require filename */
diff --git a/archival/rpm.c b/archival/rpm.c
index c4bcd60..b3d7cd5 100644
--- a/archival/rpm.c
+++ b/archival/rpm.c
@@ -279,12 +279,12 @@
 			tmpindex->type = ntohl(tmpindex->type);
 			tmpindex->count = ntohl(tmpindex->count);
 			tmpindex->offset = storepos + ntohl(tmpindex->offset);
-			if (pass==0)
+			if (pass == 0)
 				tmpindex->tag -= 743;
 		}
 		xlseek(fd, header.size, SEEK_CUR); /* Seek past store */
 		/* Skip padding to 8 byte boundary after reading signature headers */
-		if (pass==0)
+		if (pass == 0)
 			xlseek(fd, (8 - (xlseek(fd,0,SEEK_CUR) % 8)) % 8, SEEK_CUR);
 	}
 	tags = xrealloc(tags, tagindex * sizeof(struct rpmtag *)); /* realloc tags to save space */
