From 2bd5380780dfbf883ad087ea8a5becd75fd150a6 Mon Sep 17 00:00:00 2001 From: Richard Hughes Date: Fri, 3 Dec 2021 09:19:28 +0000 Subject: [PATCH] trivial: Use 0 for no limit on security attributes This behaviour now matches the D-Bus interface document. --- src/fu-history.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fu-history.c b/src/fu-history.c index 3f9403265..abf60a9b7 100644 --- a/src/fu-history.c +++ b/src/fu-history.c @@ -1421,7 +1421,7 @@ fu_history_add_security_attribute(FuHistory *self, /** * fu_history_get_security_attrs: * @self: a #FuHistory - * @limit: maximum number of attributes to return + * @limit: maximum number of attributes to return, or 0 for no limit * @error: (nullable): optional return location for an error * * Gets the security attributes in the history database. @@ -1514,7 +1514,7 @@ fu_history_get_security_attrs(FuHistory *self, guint limit, GError **error) /* success */ g_ptr_array_add(array, g_steal_pointer(&attrs)); - if (array->len >= limit) { + if (limit > 0 && array->len >= limit) { rc = SQLITE_DONE; break; }