]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Style: Use 'int' not 'char' for status return types.
authorTim Kientzle <kientzle@gmail.com>
Fri, 20 Dec 2013 05:38:53 +0000 (21:38 -0800)
committerTim Kientzle <kientzle@gmail.com>
Fri, 20 Dec 2013 05:38:53 +0000 (21:38 -0800)
Fix a const mistake.

libarchive/archive.h
libarchive/archive_read.c
libarchive/archive_read_private.h
libarchive/archive_read_support_format_7zip.c
libarchive/archive_read_support_format_rar.c
libarchive/archive_read_support_format_zip.c
libarchive/archive_util.c

index d15cc4a8a451a6d81f0badd707cb45dde8e1d3a2..1b01741ff01724d7c77fff2e702f86b03cf21fe4 100644 (file)
@@ -521,7 +521,7 @@ __LA_DECL __LA_INT64_T               archive_read_header_position(struct archive *);
  * function does not return the number of encrypted entries but#
  * just shows that there are some.
  */
-__LA_DECL char archive_read_has_encrypted_entries(struct archive *);
+__LA_DECL int  archive_read_has_encrypted_entries(struct archive *);
 
 /*
  * Returns a bitmask of capabilities that are supported by the archive format reader.
index 43e1d258cb7b940d341d66736b5c8e80c917ad2b..cc05588b60f8d1c8d856fe294bf8d84d1505ef2b 100644 (file)
@@ -764,7 +764,7 @@ archive_read_header_position(struct archive *_a)
  * function does not return the number of encrypted entries but#
  * just shows that there are some.
  */
-char
+int
 archive_read_has_encrypted_entries(struct archive *_a)
 {
        struct archive_read *a = (struct archive_read *)_a;
@@ -1149,7 +1149,7 @@ __archive_read_register_format(struct archive_read *a,
     int64_t (*seek_data)(struct archive_read *, int64_t, int),
     int (*cleanup)(struct archive_read *),
     int (*format_capabilities)(struct archive_read *),
-    char (*has_encrypted_entries)(struct archive_read *))
+    int (*has_encrypted_entries)(struct archive_read *))
 {
        int i, number_slots;
 
index 5ac009b2a4bd0fa3072c24249a733da13308ab25..6636a596879469dcfbf708c1593ed3bed5c28ecd 100644 (file)
@@ -208,7 +208,7 @@ struct archive_read {
                int64_t (*seek_data)(struct archive_read *, int64_t, int);
                int     (*cleanup)(struct archive_read *);
                int     (*format_capabilties)(struct archive_read *);
-               char    (*has_encrypted_entries)(struct archive_read *);
+               int     (*has_encrypted_entries)(struct archive_read *);
        }       formats[16];
        struct archive_format_descriptor        *format; /* Active format. */
 
@@ -230,7 +230,7 @@ int __archive_read_register_format(struct archive_read *a,
                int64_t (*seek_data)(struct archive_read *, int64_t, int),
                int (*cleanup)(struct archive_read *),
                int (*format_capabilities)(struct archive_read *),
-               char (*has_encrypted_entries)(struct archive_read *));
+               int (*has_encrypted_entries)(struct archive_read *));
 
 int __archive_read_get_bidder(struct archive_read *a,
     struct archive_read_filter_bidder **bidder);
index 13dc99af51595f4e490378b2659d43a1599efb8c..e94192e786805df474231d0f2428d25f23edba6b 100644 (file)
@@ -328,10 +328,10 @@ struct _7zip {
        char                     format_name[64];
 
        /* Custom value that is non-zero if this archive contains encrypted entries. */
-       char has_encrypted_entries;
+       char                     has_encrypted_entries;
 };
 
-static char    archive_read_format_7zip_has_encrypted_entries(struct archive_read *);
+static int     archive_read_format_7zip_has_encrypted_entries(struct archive_read *);
 static int     archive_read_support_format_7zip_capabilities(struct archive_read *a);
 static int     archive_read_format_7zip_bid(struct archive_read *, int);
 static int     archive_read_format_7zip_cleanup(struct archive_read *);
@@ -444,7 +444,8 @@ archive_read_support_format_7zip_capabilities(struct archive_read * a)
 }
 
 
-static char archive_read_format_7zip_has_encrypted_entries(struct archive_read *_a)
+static int
+archive_read_format_7zip_has_encrypted_entries(struct archive_read *_a)
 {
        if (_a && _a->format) {
                struct _7zip * zip = (struct _7zip *)_a->format->data;
index 03d932a1d340c5dd4613545eb7bfd4686f1ba4fb..1ad0e06b4ded38e3aa34c7967c58f4b716c0466c 100644 (file)
@@ -312,7 +312,7 @@ struct rar
 };
 
 static int archive_read_support_format_rar_capabilities(struct archive_read *);
-static char archive_read_format_rar_has_encrypted_entries(struct archive_read *);
+static int archive_read_format_rar_has_encrypted_entries(struct archive_read *);
 static int archive_read_format_rar_bid(struct archive_read *, int);
 static int archive_read_format_rar_options(struct archive_read *,
     const char *, const char *);
@@ -685,7 +685,8 @@ archive_read_support_format_rar_capabilities(struct archive_read * a)
                        | ARCHIVE_READ_FORMAT_CAPS_ENCRYPT_METADATA);
 }
 
-static char archive_read_format_rar_has_encrypted_entries(struct archive_read *_a)
+static int
+archive_read_format_rar_has_encrypted_entries(struct archive_read *_a)
 {
        if (_a && _a->format) {
                struct rar * rar = (struct rar *)_a->format->data;
index 5c25281f226ed6a2fcaad349ff1c99e5da91ace3..a0f0c1b134936941b488cba5a1598790231f7bee 100644 (file)
@@ -129,7 +129,7 @@ struct zip {
 #define ZIP_CENTRAL_DIRECTORY_ENCRYPTED        (1<<13) 
 #define ZIP_UTF8_NAME  (1<<11) 
 
-static char    archive_read_format_zip_has_encrypted_entries(struct archive_read *);
+static int     archive_read_format_zip_has_encrypted_entries(struct archive_read *);
 static int     archive_read_support_format_zip_capabilities_seekable(struct archive_read *a);
 static int     archive_read_support_format_zip_capabilities_streamable(struct archive_read *a);
 static int     archive_read_format_zip_streamable_bid(struct archive_read *,
@@ -263,7 +263,7 @@ archive_read_support_format_zip_capabilities_streamable(struct archive_read * a)
 }
 
 
-static char
+static int
 archive_read_format_zip_has_encrypted_entries(struct archive_read *_a)
 {
        if (_a && _a->format) {
index c1e171b68124fcdc9d9c73946479a4b36f090576..3d92566b2c09e9483d2409576dba68c00f7fe3f2 100644 (file)
@@ -106,7 +106,7 @@ archive_version_details(void)
 #ifdef HAVE_BZLIB_H
                {
                        const char *p = BZ2_bzlibVersion();
-                       char *sep = strchr(p, ',');
+                       const char *sep = strchr(p, ',');
                        if (sep == NULL)
                                sep = p + strlen(p);
                        archive_strcat(&str, " bz2lib/");