From dcf3c671314b36285277073c0a3d3a09bf4d93e6 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Mon, 24 Oct 2016 15:15:51 -0400 Subject: 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. --- ks_flash.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ks_flash.c') diff --git a/ks_flash.c b/ks_flash.c index 7c96f90..10df54b 100644 --- a/ks_flash.c +++ b/ks_flash.c @@ -1156,7 +1156,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) @@ -1240,7 +1240,7 @@ static hal_error_t ks_match(hal_ks_t *ks, if (attributes_len > 0 && memchr(need_attr, 1, sizeof(need_attr)) != NULL) continue; - *previous_uuid = result[*result_len] = db.ksi.names[b].name; + result[*result_len] = db.ksi.names[b].name; ++*result_len; possible = 0; } -- cgit v1.2.3