mirror of
https://git.proxmox.com/git/fwupd
synced 2026-03-27 19:57:34 +00:00
trivial: Use 0 for no limit on security attributes
This behaviour now matches the D-Bus interface document.
This commit is contained in:
parent
1784a0aca5
commit
2bd5380780
@ -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;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user