]> git.proxmox.com Git - mirror_qemu.git/commitdiff
error: Add error_vprepend() in comment of ERRP_GUARD() rules
authorZhao Liu <zhao1.liu@intel.com>
Mon, 11 Mar 2024 03:37:54 +0000 (11:37 +0800)
committerThomas Huth <thuth@redhat.com>
Tue, 12 Mar 2024 10:45:33 +0000 (11:45 +0100)
The error_vprepend() should use ERRP_GUARD() just as the documentation
of ERRP_GUARD() says:

> It must be used when the function dereferences @errp or passes
> @errp to error_prepend(), error_vprepend(), or error_append_hint().

Considering that error_vprepend() is also an API provided in error.h,
it is necessary to add it to the description of the rules for using
ERRP_GUARD().

Cc: Markus Armbruster <armbru@redhat.com>
Cc: Michael Roth <michael.roth@amd.com>
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Message-ID: <20240311033822.3142585-2-zhao1.liu@linux.intel.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
include/qapi/error.h

index f21a231bb1a6fb39300585d02e071a1fc79edd25..71f8fb2c50eee9a544992d0c05263c9793956fe1 100644 (file)
  *
  * Without ERRP_GUARD(), use of the @errp parameter is restricted:
  * - It must not be dereferenced, because it may be null.
- * - It should not be passed to error_prepend() or
+ * - It should not be passed to error_prepend(), error_vprepend(), or
  *   error_append_hint(), because that doesn't work with &error_fatal.
  * ERRP_GUARD() lifts these restrictions.
  *