diff options
Diffstat (limited to 'archival')
-rw-r--r-- | archival/dpkg.c | 11 | ||||
-rw-r--r-- | archival/tar.c | 2 |
2 files changed, 6 insertions, 7 deletions
diff --git a/archival/dpkg.c b/archival/dpkg.c index 0c1f541e0..bd729a2a9 100644 --- a/archival/dpkg.c +++ b/archival/dpkg.c | |||
@@ -582,10 +582,9 @@ static int read_package_field(const char *package_buffer, char **field_name, cha | |||
582 | 582 | ||
583 | static unsigned fill_package_struct(char *control_buffer) | 583 | static unsigned fill_package_struct(char *control_buffer) |
584 | { | 584 | { |
585 | static const char *const field_names[] = { "Package", "Version", | 585 | static const char field_names[] = "Package\0""Version\0" |
586 | "Pre-Depends", "Depends","Replaces", "Provides", | 586 | "Pre-Depends\0""Depends\0""Replaces\0""Provides\0" |
587 | "Conflicts", "Suggests", "Recommends", "Enhances", NULL | 587 | "Conflicts\0""Suggests\0""Recommends\0""Enhances\0"; |
588 | }; | ||
589 | 588 | ||
590 | common_node_t *new_node = xzalloc(sizeof(common_node_t)); | 589 | common_node_t *new_node = xzalloc(sizeof(common_node_t)); |
591 | char *field_name; | 590 | char *field_name; |
@@ -602,10 +601,10 @@ static unsigned fill_package_struct(char *control_buffer) | |||
602 | &field_name, &field_value); | 601 | &field_name, &field_value); |
603 | 602 | ||
604 | if (field_name == NULL) { | 603 | if (field_name == NULL) { |
605 | goto fill_package_struct_cleanup; /* Oh no, the dreaded goto statement ! */ | 604 | goto fill_package_struct_cleanup; /* Oh no, the dreaded goto statement! */ |
606 | } | 605 | } |
607 | 606 | ||
608 | field_num = index_in_str_array(field_names, field_name); | 607 | field_num = index_in_strings(field_names, field_name); |
609 | switch (field_num) { | 608 | switch (field_num) { |
610 | case 0: /* Package */ | 609 | case 0: /* Package */ |
611 | new_node->name = search_name_hashtable(field_value); | 610 | new_node->name = search_name_hashtable(field_value); |
diff --git a/archival/tar.c b/archival/tar.c index d03b18b9c..7d7bf79d6 100644 --- a/archival/tar.c +++ b/archival/tar.c | |||
@@ -752,7 +752,7 @@ static const char tar_longopts[] = | |||
752 | # if ENABLE_FEATURE_TAR_FROM | 752 | # if ENABLE_FEATURE_TAR_FROM |
753 | "exclude\0" Required_argument "\xff" | 753 | "exclude\0" Required_argument "\xff" |
754 | # endif | 754 | # endif |
755 | "\0"; | 755 | ; |
756 | #endif | 756 | #endif |
757 | 757 | ||
758 | int tar_main(int argc, char **argv); | 758 | int tar_main(int argc, char **argv); |