]> wimlib.net Git - wimlib/commitdiff
security.c: Use int32_t for security IDs
authorEric Biggers <ebiggers3@gmail.com>
Thu, 19 Jun 2014 03:10:34 +0000 (22:10 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Thu, 19 Jun 2014 03:11:16 +0000 (22:11 -0500)
include/wimlib/security.h
src/security.c

index f81bb04a64813570e761e6e05ffd557762cd0de6..002aef4cc36d16f7b829882bc21fa8da51db99d1 100644 (file)
@@ -41,7 +41,7 @@ rollback_new_security_descriptors(struct wim_sd_set *sd_set);
 extern void
 destroy_sd_set(struct wim_sd_set *sd_set);
 
-extern int
+extern int32_t
 sd_set_add_sd(struct wim_sd_set *sd_set, const char descriptor[],
              size_t size);
 
index 6348918ac5f20407ac2efc4b174444eceda0d67e..e6a7e93a84d6001ed47f55afdfdfd8d3e2c1f395 100644 (file)
@@ -232,7 +232,7 @@ free_wim_security_data(struct wim_security_data *sd)
 }
 
 struct sd_node {
-       int security_id;
+       int32_t security_id;
        u8 hash[SHA1_HASH_SIZE];
        struct avl_tree_node index_node;
 };
@@ -286,7 +286,7 @@ insert_sd_node(struct wim_sd_set *set, struct sd_node *new)
 
 /* Returns the index of the security descriptor having a SHA1 message digest of
  * @hash.  If not found, return -1. */
-static int
+static int32_t
 lookup_sd(struct wim_sd_set *set, const u8 hash[SHA1_HASH_SIZE])
 {
        struct avl_tree_node *res;
@@ -307,11 +307,11 @@ lookup_sd(struct wim_sd_set *set, const u8 hash[SHA1_HASH_SIZE])
  * the security ID for it.  If a new security descriptor cannot be allocated,
  * return -1.
  */
-int
+int32_t
 sd_set_add_sd(struct wim_sd_set *sd_set, const char *descriptor, size_t size)
 {
        u8 hash[SHA1_HASH_SIZE];
-       int security_id;
+       int32_t security_id;
        struct sd_node *new;
        u8 **descriptors;
        u64 *sizes;