llist must initialize, add loses ifdef, small indent correction

This commit is contained in:
"Vladimir N. Oleynik"
2005-10-15 06:32:38 +00:00
parent 3ee6c24ea2
commit 84e7511607

View File

@ -214,7 +214,8 @@ static int putOctal(char *cp, int len, long value)
/* Write out a tar header for the specified file/directory/whatever */ /* Write out a tar header for the specified file/directory/whatever */
static inline int writeTarHeader(struct TarBallInfo *tbInfo, static inline int writeTarHeader(struct TarBallInfo *tbInfo,
const char *header_name, const char *header_name,
const char *real_name, struct stat *statbuf) const char *real_name,
struct stat *statbuf)
{ {
long chksum = 0; long chksum = 0;
struct TarHeader header; struct TarHeader header;
@ -689,8 +690,10 @@ int tar_main(int argc, char **argv)
char *base_dir = NULL; char *base_dir = NULL;
const char *tar_filename = "-"; const char *tar_filename = "-";
unsigned long opt; unsigned long opt;
llist_t *excludes;
#if defined(CONFIG_FEATURE_TAR_FROM)
llist_t *excludes = NULL;
#endif
/* Initialise default values */ /* Initialise default values */
tar_handle = init_handle(); tar_handle = init_handle();
@ -772,7 +775,7 @@ int tar_main(int argc, char **argv)
#endif #endif
/* Check if we are reading from stdin */ /* Check if we are reading from stdin */
if ((argv[optind]) && (*argv[optind] == '-')) { if (argv[optind] && *argv[optind] == '-') {
/* Default is to read from stdin, so just skip to next arg */ /* Default is to read from stdin, so just skip to next arg */
optind++; optind++;
} }
@ -857,7 +860,7 @@ int tar_main(int argc, char **argv)
while (tar_handle->accept) { while (tar_handle->accept) {
if (find_list_entry(tar_handle->reject, tar_handle->accept->data) == NULL) { if (find_list_entry(tar_handle->reject, tar_handle->accept->data) == NULL) {
if (find_list_entry(tar_handle->passed, tar_handle->accept->data) == NULL) { if (find_list_entry(tar_handle->passed, tar_handle->accept->data) == NULL) {
bb_error_msg_and_die("%s: Not found in archive\n", tar_handle->accept->data); bb_error_msg_and_die("%s: Not found in archive", tar_handle->accept->data);
} }
} }
tar_handle->accept = tar_handle->accept->link; tar_handle->accept = tar_handle->accept->link;