diff options
author | Rob Landley <rob@landley.net> | 2006-02-22 17:01:00 +0000 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2006-02-22 17:01:00 +0000 |
commit | 0a7c8ef6e220b5f8fff4f2cb0af630255a2a6a58 (patch) | |
tree | f32eb89325299a3abade721ffe149b0e516747c1 /archival | |
parent | fb16d5c6aa8aef30d313356b5a83ef0a60114c9a (diff) | |
download | busybox-w32-0a7c8ef6e220b5f8fff4f2cb0af630255a2a6a58.tar.gz busybox-w32-0a7c8ef6e220b5f8fff4f2cb0af630255a2a6a58.tar.bz2 busybox-w32-0a7c8ef6e220b5f8fff4f2cb0af630255a2a6a58.zip |
Patch from Denis Vlasenko to constify things and fix a few typos.
Diffstat (limited to 'archival')
-rw-r--r-- | archival/dpkg.c | 7 | ||||
-rw-r--r-- | archival/unzip.c | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/archival/dpkg.c b/archival/dpkg.c index 7ed17d711..70eaefb94 100644 --- a/archival/dpkg.c +++ b/archival/dpkg.c | |||
@@ -552,9 +552,12 @@ static void free_package(common_node_t *node) | |||
552 | 552 | ||
553 | static unsigned int fill_package_struct(char *control_buffer) | 553 | static unsigned int fill_package_struct(char *control_buffer) |
554 | { | 554 | { |
555 | static const char *const field_names[] = { "Package", "Version", | ||
556 | "Pre-Depends", "Depends","Replaces", "Provides", | ||
557 | "Conflicts", "Suggests", "Recommends", "Enhances", 0 | ||
558 | }; | ||
559 | |||
555 | common_node_t *new_node = (common_node_t *) xcalloc(1, sizeof(common_node_t)); | 560 | common_node_t *new_node = (common_node_t *) xcalloc(1, sizeof(common_node_t)); |
556 | const char *field_names[] = { "Package", "Version", "Pre-Depends", "Depends", | ||
557 | "Replaces", "Provides", "Conflicts", "Suggests", "Recommends", "Enhances", 0}; | ||
558 | char *field_name; | 561 | char *field_name; |
559 | char *field_value; | 562 | char *field_value; |
560 | int field_start = 0; | 563 | int field_start = 0; |
diff --git a/archival/unzip.c b/archival/unzip.c index f602db12d..ff2b1a266 100644 --- a/archival/unzip.c +++ b/archival/unzip.c | |||
@@ -220,7 +220,7 @@ extern int unzip_main(int argc, char **argv) | |||
220 | overwrite = (overwrite == o_prompt) ? o_never : overwrite; | 220 | overwrite = (overwrite == o_prompt) ? o_never : overwrite; |
221 | 221 | ||
222 | } else { | 222 | } else { |
223 | char *extn[] = {"", ".zip", ".ZIP"}; | 223 | static const char *const extn[] = {"", ".zip", ".ZIP"}; |
224 | int orig_src_fn_len = strlen(src_fn); | 224 | int orig_src_fn_len = strlen(src_fn); |
225 | for(i = 0; (i < 3) && (src_fd == -1); i++) { | 225 | for(i = 0; (i < 3) && (src_fd == -1); i++) { |
226 | strcpy(src_fn + orig_src_fn_len, extn[i]); | 226 | strcpy(src_fn + orig_src_fn_len, extn[i]); |