Patch from Denis Vlasenko to constify things and fix a few typos.

This commit is contained in:
Rob Landley
2006-02-22 17:01:00 +00:00
parent fb16d5c6aa
commit 0a7c8ef6e2
9 changed files with 74 additions and 54 deletions

View File

@@ -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;

View File

@@ -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]);