aboutsummaryrefslogtreecommitdiff
path: root/ks_volatile.c
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2016-10-24 15:15:51 -0400
committerRob Austein <sra@hactrn.net>2016-10-24 15:15:51 -0400
commitdcf3c671314b36285277073c0a3d3a09bf4d93e6 (patch)
treee41e68a44ce08dfd3bf976d66634daf9c8097e9b /ks_volatile.c
parent87f0998afe6dc6946d01429fc74f8696f0da2f0a (diff)
Make previous_uuid an input-only argument to hal_rpc_pkey_match().
In retrospect it's obvious that this never needed to be an input/output argument, as its value will always be the same as the last value in the returned array. Doh. So simplify the RPC and call sequence slightly by removing the unnecessary output value.
Diffstat (limited to 'ks_volatile.c')
-rw-r--r--ks_volatile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ks_volatile.c b/ks_volatile.c
index 2018adc..e88b871 100644
--- a/ks_volatile.c
+++ b/ks_volatile.c
@@ -380,7 +380,7 @@ static hal_error_t ks_match(hal_ks_t *ks,
hal_uuid_t *result,
unsigned *result_len,
const unsigned result_max,
- hal_uuid_t *previous_uuid)
+ const hal_uuid_t * const previous_uuid)
{
if (ks == NULL || attributes == NULL ||
result == NULL || result_len == NULL || previous_uuid == NULL)
@@ -451,7 +451,7 @@ static hal_error_t ks_match(hal_ks_t *ks,
continue;
}
- *previous_uuid = result[*result_len] = ksv->db->ksi.names[b].name;
+ result[*result_len] = ksv->db->ksi.names[b].name;
++*result_len;
}