projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
97fd6d8
)
dpkg: free_package(NULL) is ok, so don't test for NULL, just free.
author
Denis Vlasenko
<vda.linux@googlemail.com>
Mon, 19 Mar 2007 21:48:56 +0000
(21:48 -0000)
committer
Denis Vlasenko
<vda.linux@googlemail.com>
Mon, 19 Mar 2007 21:48:56 +0000
(21:48 -0000)
archival/dpkg.c
patch
|
blob
|
history
diff --git
a/archival/dpkg.c
b/archival/dpkg.c
index ebdf6c68a1ceab8d163c8782490603e519932ada..0a42deb39cbb76ef1958d2763d74248c55b8fbe2 100644
(file)
--- a/
archival/dpkg.c
+++ b/
archival/dpkg.c
@@
-643,8
+643,7
@@
static unsigned fill_package_struct(char *control_buffer)
return -1;
}
num = search_package_hashtable(new_node->name, new_node->version, VER_EQUAL);
- if (package_hashtable[num] != NULL)
- free_package(package_hashtable[num]);
+ free_package(package_hashtable[num]);
package_hashtable[num] = new_node;
return num;
}
@@
-1739,9
+1738,7
@@
int dpkg_main(int argc, char **argv)
}
for (i = 0; i < PACKAGE_HASH_PRIME; i++) {
- if (package_hashtable[i] != NULL) {
- free_package(package_hashtable[i]);
- }
+ free_package(package_hashtable[i]);
}
for (i = 0; i < STATUS_HASH_PRIME; i++) {