diff options
author | Denis Vlasenko | 2007-03-19 21:48:56 +0000 |
---|---|---|
committer | Denis Vlasenko | 2007-03-19 21:48:56 +0000 |
commit | 88a2aa98e06cf6b0aa00a3cf88376a1d3497fb2c (patch) | |
tree | 16f9ce2ca7cf2943064acdd891fab8a86909d2a9 | |
parent | 97fd6d81b4f101a32c31c4711fb43d0f5c78c47b (diff) | |
download | busybox-88a2aa98e06cf6b0aa00a3cf88376a1d3497fb2c.zip busybox-88a2aa98e06cf6b0aa00a3cf88376a1d3497fb2c.tar.gz |
dpkg: free_package(NULL) is ok, so don't test for NULL, just free.
-rw-r--r-- | archival/dpkg.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/archival/dpkg.c b/archival/dpkg.c index ebdf6c6..0a42deb 100644 --- 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++) { |