[Libguestfs] [PATCH nbdkit v3 4/6] server: debug: Return earlier if not verbose

Eric Blake eblake at redhat.com
Tue May 9 18:20:52 UTC 2023


On Tue, May 09, 2023 at 03:51:19PM +0100, Richard W.M. Jones wrote:
> In particular return before we have allocated 'str' with
> attribute((cleanup)) so that we don't waste time calling free (NULL)
> on the hot-ish path out of the function.
> ---
>  server/debug.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)

Good thing we don't insist on C89 declaration before statement.  This
is one case where a late declaration makes sense.

Reviewed-by: Eric Blake <eblake at redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


More information about the Libguestfs mailing list