KEYS: Make the key matching functions return bool
Make the key matching functions pointed to by key_match_data::cmp return bool rather than int. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Vivek Goyal <vgoyal@redhat.com>
This commit is contained in:
@@ -56,10 +56,12 @@ typedef int (*request_key_actor_t)(struct key_construction *key,
|
||||
* Preparsed matching criterion.
|
||||
*/
|
||||
struct key_match_data {
|
||||
/* Comparison function, defaults to type->match, but can be replaced by
|
||||
* type->match_preparse(). */
|
||||
int (*cmp)(const struct key *key,
|
||||
const struct key_match_data *match_data);
|
||||
/* Comparison function, defaults to exact description match, but can be
|
||||
* overridden by type->match_preparse(). Should return true if a match
|
||||
* is found and false if not.
|
||||
*/
|
||||
bool (*cmp)(const struct key *key,
|
||||
const struct key_match_data *match_data);
|
||||
|
||||
const void *raw_data; /* Raw match data */
|
||||
void *preparsed; /* For ->match_preparse() to stash stuff */
|
||||
|
||||
Reference in New Issue
Block a user