From: Eric Biggers Date: Thu, 19 Jun 2014 03:10:34 +0000 (-0500) Subject: security.c: Use int32_t for security IDs X-Git-Tag: v1.7.1~95 X-Git-Url: https://wimlib.net/git/?p=wimlib;a=commitdiff_plain;h=76b57cc8cf113194136a7e264644a37515650ccc;ds=sidebyside security.c: Use int32_t for security IDs --- diff --git a/include/wimlib/security.h b/include/wimlib/security.h index f81bb04a..002aef4c 100644 --- a/include/wimlib/security.h +++ b/include/wimlib/security.h @@ -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); diff --git a/src/security.c b/src/security.c index 6348918a..e6a7e93a 100644 --- a/src/security.c +++ b/src/security.c @@ -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;