summaryrefslogtreecommitdiff
path: root/archival
diff options
context:
space:
mode:
authorRob Landley2006-02-22 17:01:00 +0000
committerRob Landley2006-02-22 17:01:00 +0000
commit0a7c8ef6e220b5f8fff4f2cb0af630255a2a6a58 (patch)
treef32eb89325299a3abade721ffe149b0e516747c1 /archival
parentfb16d5c6aa8aef30d313356b5a83ef0a60114c9a (diff)
downloadbusybox-0a7c8ef6e220b5f8fff4f2cb0af630255a2a6a58.zip
busybox-0a7c8ef6e220b5f8fff4f2cb0af630255a2a6a58.tar.gz
Patch from Denis Vlasenko to constify things and fix a few typos.
Diffstat (limited to 'archival')
-rw-r--r--archival/dpkg.c7
-rw-r--r--archival/unzip.c2
2 files changed, 6 insertions, 3 deletions
diff --git a/archival/dpkg.c b/archival/dpkg.c
index 7ed17d7..70eaefb 100644
--- a/archival/dpkg.c
+++ b/archival/dpkg.c
@@ -552,9 +552,12 @@ static void free_package(common_node_t *node)
static unsigned int fill_package_struct(char *control_buffer)
{
+ static const char *const field_names[] = { "Package", "Version",
+ "Pre-Depends", "Depends","Replaces", "Provides",
+ "Conflicts", "Suggests", "Recommends", "Enhances", 0
+ };
+
common_node_t *new_node = (common_node_t *) xcalloc(1, sizeof(common_node_t));
- const char *field_names[] = { "Package", "Version", "Pre-Depends", "Depends",
- "Replaces", "Provides", "Conflicts", "Suggests", "Recommends", "Enhances", 0};
char *field_name;
char *field_value;
int field_start = 0;
diff --git a/archival/unzip.c b/archival/unzip.c
index f602db1..ff2b1a2 100644
--- a/archival/unzip.c
+++ b/archival/unzip.c
@@ -220,7 +220,7 @@ extern int unzip_main(int argc, char **argv)
overwrite = (overwrite == o_prompt) ? o_never : overwrite;
} else {
- char *extn[] = {"", ".zip", ".ZIP"};
+ static const char *const extn[] = {"", ".zip", ".ZIP"};
int orig_src_fn_len = strlen(src_fn);
for(i = 0; (i < 3) && (src_fd == -1); i++) {
strcpy(src_fn + orig_src_fn_len, extn[i]);