]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Fix style.
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Sun, 12 Oct 2014 05:36:28 +0000 (14:36 +0900)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Sun, 12 Oct 2014 05:36:28 +0000 (14:36 +0900)
cat/bsdcat.c

index b06ee97b239f6afc891ac169991072bfd554356e..af140e0001c7058e6b2f133d2659b79ea8492d4e 100644 (file)
@@ -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();
 }