]> wimlib.net Git - wimlib/blobdiff - src/security.c
security.c: Use int32_t for security IDs
[wimlib] / src / security.c
index 12cfcb4ce6ee5c3e335059472133558e92a7205c..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;
 };
@@ -275,7 +275,7 @@ _avl_cmp_nodes_by_hash(const struct avl_tree_node *n1,
        return hashes_cmp(SD_NODE(n1)->hash, SD_NODE(n2)->hash);
 }
 
-/* Inserts a new node into the security descriptor index tree.  Returns true
+/* Inserts a new node into the security descriptor index tree.  Returns true
  * if successful (not a duplicate).  */
 static bool
 insert_sd_node(struct wim_sd_set *set, struct sd_node *new)
@@ -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;