diff options
author | Michihiro NAKAJIMA <ggcueroad@gmail.com> | 2014-10-12 14:36:28 +0900 |
---|---|---|
committer | Michihiro NAKAJIMA <ggcueroad@gmail.com> | 2014-10-12 14:36:28 +0900 |
commit | f966682a86d1cfd7bce5e780e691d6a296a0614b (patch) | |
tree | daf47e48bb32ebe03daa067400e0e12871419ef6 /cat/bsdcat.c | |
parent | 78743ea72efadf70411cb82c92a9b5100c521195 (diff) | |
download | libarchive-f966682a86d1cfd7bce5e780e691d6a296a0614b.tar.gz |
Fix style.
Diffstat (limited to 'cat/bsdcat.c')
-rw-r--r-- | cat/bsdcat.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/cat/bsdcat.c b/cat/bsdcat.c index b06ee97b..af140e00 100644 --- a/cat/bsdcat.c +++ b/cat/bsdcat.c @@ -53,7 +53,8 @@ usage(FILE *stream, int eval) { const char *p; p = lafe_getprogname(); - fprintf(stream, "Usage: %s [-h] [--help] [--version] [--] [filenames...]\n", p); + fprintf(stream, + "Usage: %s [-h] [--help] [--version] [--] [filenames...]\n", p); exit(eval); } @@ -88,18 +89,17 @@ bsdcat_read_to_stdout(char* filename) { int r; - if (archive_read_open_filename(a, filename, BYTES_PER_BLOCK) != ARCHIVE_OK) - goto err; + if (archive_read_open_filename(a, filename, BYTES_PER_BLOCK) + != ARCHIVE_OK) + bsdcat_print_error(); else if (r = archive_read_next_header(a, &ae), r != ARCHIVE_OK && r != ARCHIVE_EOF) - goto err; + bsdcat_print_error(); else if (r == ARCHIVE_EOF) /* for empty payloads don't try and read data */ ; - else if (archive_read_data_into_fd(a, 1) != ARCHIVE_OK) { - err: + else if (archive_read_data_into_fd(a, 1) != ARCHIVE_OK) bsdcat_print_error(); - } if (archive_read_free(a) != ARCHIVE_OK) bsdcat_print_error(); } |