aboutsummaryrefslogtreecommitdiff
path: root/archival
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2006-03-01 16:39:45 +0000
committerRob Landley <rob@landley.net>2006-03-01 16:39:45 +0000
commite7c43b66d74ee9902a6732122788a7a16bcfbf18 (patch)
treeebb8583e9e1265588592614c0b4878daded44125 /archival
parent93f2286e6e59dab5eed14b5912a79254031c5a62 (diff)
downloadbusybox-e7c43b66d74ee9902a6732122788a7a16bcfbf18.tar.gz
Cleanup patch from Denis Vlasenko. Mostly variants of removing the if(x)
from before "if(x) free(x)".
Diffstat (limited to 'archival')
-rw-r--r--archival/dpkg.c3
-rw-r--r--archival/libunarchive/decompress_bunzip2.c2
-rw-r--r--archival/unzip.c6
3 files changed, 5 insertions, 6 deletions
diff --git a/archival/dpkg.c b/archival/dpkg.c
index 70eaefb94..74d3a83d9 100644
--- a/archival/dpkg.c
+++ b/archival/dpkg.c
@@ -544,8 +544,7 @@ static void free_package(common_node_t *node)
for (i = 0; i < node->num_of_edges; i++) {
free(node->edge[i]);
}
- if ( node->edge )
- free(node->edge);
+ free(node->edge);
free(node);
}
}
diff --git a/archival/libunarchive/decompress_bunzip2.c b/archival/libunarchive/decompress_bunzip2.c
index df6fa078f..7f700ca7f 100644
--- a/archival/libunarchive/decompress_bunzip2.c
+++ b/archival/libunarchive/decompress_bunzip2.c
@@ -714,7 +714,7 @@ extern int uncompressStream(int src_fd, int dst_fd)
} else {
bb_error_msg("Decompression failed");
}
- if(bd->dbuf) free(bd->dbuf);
+ free(bd->dbuf);
free(bd);
free(outbuf);
diff --git a/archival/unzip.c b/archival/unzip.c
index ff2b1a266..7e0d107cc 100644
--- a/archival/unzip.c
+++ b/archival/unzip.c
@@ -393,7 +393,7 @@ extern int unzip_main(int argc, char **argv)
goto _check_file;
default:
- printf("error: invalid response [%c]\n",(char)i);
+ printf("error: invalid response [%c]\n",(char)i);
goto _check_file;
}
@@ -405,8 +405,8 @@ extern int unzip_main(int argc, char **argv)
}
if (verbosity == v_list) {
- printf(" -------- -------\n");
- printf("%9d %d files\n", total_size, total_entries);
+ printf(" -------- -------\n"
+ "%9d %d files\n", total_size, total_entries);
}
return(EXIT_SUCCESS);