From 079f8afa0a16112cbaf7012c82b38b7358b82141 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Mon, 27 Nov 2006 16:49:31 +0000 Subject: style cleanup: return(a) -> return a, part 1 --- archival/cpio.c | 2 +- archival/dpkg_deb.c | 4 ++-- archival/libunarchive/decompress_unzip.c | 2 +- archival/libunarchive/filter_accept_all.c | 8 +++----- archival/libunarchive/filter_accept_list.c | 8 +++----- archival/libunarchive/filter_accept_list_reassign.c | 8 ++++---- archival/libunarchive/filter_accept_reject_list.c | 6 +++--- archival/libunarchive/get_header_ar.c | 4 ++-- 8 files changed, 19 insertions(+), 23 deletions(-) (limited to 'archival') diff --git a/archival/cpio.c b/archival/cpio.c index 751e87952..73651ba10 100644 --- a/archival/cpio.c +++ b/archival/cpio.c @@ -82,5 +82,5 @@ int cpio_main(int argc, char **argv) while (get_header_cpio(archive_handle) == EXIT_SUCCESS); - return(EXIT_SUCCESS); + return EXIT_SUCCESS; } diff --git a/archival/dpkg_deb.c b/archival/dpkg_deb.c index 80a5f3250..d11d9df17 100644 --- a/archival/dpkg_deb.c +++ b/archival/dpkg_deb.c @@ -90,7 +90,7 @@ int dpkg_deb_main(int argc, char **argv) unpack_ar_archive(ar_archive); /* Cleanup */ - close (ar_archive->src_fd); + close(ar_archive->src_fd); - return(EXIT_SUCCESS); + return EXIT_SUCCESS; } diff --git a/archival/libunarchive/decompress_unzip.c b/archival/libunarchive/decompress_unzip.c index 9e3e98dd5..621d84c2d 100644 --- a/archival/libunarchive/decompress_unzip.c +++ b/archival/libunarchive/decompress_unzip.c @@ -123,7 +123,7 @@ static unsigned int fill_bitbuffer(unsigned int bitbuffer, unsigned int *current bytebuffer_offset++; *current += 8; } - return(bitbuffer); + return bitbuffer; } /* diff --git a/archival/libunarchive/filter_accept_all.c b/archival/libunarchive/filter_accept_all.c index e2ff06d51..5c991cac4 100644 --- a/archival/libunarchive/filter_accept_all.c +++ b/archival/libunarchive/filter_accept_all.c @@ -11,9 +11,7 @@ /* Accept any non-null name, its not really a filter at all */ char filter_accept_all(archive_handle_t *archive_handle) { - if (archive_handle->file_header->name) { - return(EXIT_SUCCESS); - } else { - return(EXIT_FAILURE); - } + if (archive_handle->file_header->name) + return EXIT_SUCCESS; + return EXIT_FAILURE; } diff --git a/archival/libunarchive/filter_accept_list.c b/archival/libunarchive/filter_accept_list.c index 253021a86..cfc1b0c58 100644 --- a/archival/libunarchive/filter_accept_list.c +++ b/archival/libunarchive/filter_accept_list.c @@ -13,9 +13,7 @@ */ char filter_accept_list(archive_handle_t *archive_handle) { - if (find_list_entry(archive_handle->accept, archive_handle->file_header->name)) { - return(EXIT_SUCCESS); - } else { - return(EXIT_FAILURE); - } + if (find_list_entry(archive_handle->accept, archive_handle->file_header->name)) + return EXIT_SUCCESS; + return EXIT_FAILURE; } diff --git a/archival/libunarchive/filter_accept_list_reassign.c b/archival/libunarchive/filter_accept_list_reassign.c index c26f2e036..04b678007 100644 --- a/archival/libunarchive/filter_accept_list_reassign.c +++ b/archival/libunarchive/filter_accept_list_reassign.c @@ -30,19 +30,19 @@ char filter_accept_list_reassign(archive_handle_t *archive_handle) #ifdef CONFIG_FEATURE_DEB_TAR_GZ if (strcmp(name_ptr, ".gz") == 0) { archive_handle->action_data_subarchive = get_header_tar_gz; - return(EXIT_SUCCESS); + return EXIT_SUCCESS; } #endif #ifdef CONFIG_FEATURE_DEB_TAR_BZ2 if (strcmp(name_ptr, ".bz2") == 0) { archive_handle->action_data_subarchive = get_header_tar_bz2; - return(EXIT_SUCCESS); + return EXIT_SUCCESS; } #endif if (ENABLE_FEATURE_DEB_TAR_LZMA && !strcmp(name_ptr, ".lzma")) { archive_handle->action_data_subarchive = get_header_tar_lzma; - return(EXIT_SUCCESS); + return EXIT_SUCCESS; } } - return(EXIT_FAILURE); + return EXIT_FAILURE; } diff --git a/archival/libunarchive/filter_accept_reject_list.c b/archival/libunarchive/filter_accept_reject_list.c index a3a938c62..79da350b6 100644 --- a/archival/libunarchive/filter_accept_reject_list.c +++ b/archival/libunarchive/filter_accept_reject_list.c @@ -19,15 +19,15 @@ char filter_accept_reject_list(archive_handle_t *archive_handle) /* If the key is in a reject list fail */ if (reject_entry) { - return(EXIT_FAILURE); + return EXIT_FAILURE; } accept_entry = find_list_entry2(archive_handle->accept, key); /* Fail if an accept list was specified and the key wasnt in there */ if ((accept_entry == NULL) && archive_handle->accept) { - return(EXIT_FAILURE); + return EXIT_FAILURE; } /* Accepted */ - return(EXIT_SUCCESS); + return EXIT_SUCCESS; } diff --git a/archival/libunarchive/get_header_ar.c b/archival/libunarchive/get_header_ar.c index 0d040e30b..d0791e99c 100644 --- a/archival/libunarchive/get_header_ar.c +++ b/archival/libunarchive/get_header_ar.c @@ -30,7 +30,7 @@ char get_header_ar(archive_handle_t *archive_handle) /* dont use xread as we want to handle the error ourself */ if (read(archive_handle->src_fd, ar.raw, 60) != 60) { /* End Of File */ - return(EXIT_FAILURE); + return EXIT_FAILURE; } /* ar header starts on an even byte (2 byte aligned) @@ -108,5 +108,5 @@ char get_header_ar(archive_handle_t *archive_handle) /* Set the file pointer to the correct spot, we may have been reading a compressed file */ lseek(archive_handle->src_fd, archive_handle->offset, SEEK_SET); - return(EXIT_SUCCESS); + return EXIT_SUCCESS; } -- cgit v1.2.3