From 76b57cc8cf113194136a7e264644a37515650ccc Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Wed, 18 Jun 2014 22:10:34 -0500 Subject: [PATCH] security.c: Use int32_t for security IDs --- include/wimlib/security.h | 2 +- src/security.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) 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; -- 2.43.0