|
From: | Philippe Mathieu-Daudé |
Subject: | Re: [PATCH v2 4/4] block/export: avoid g_return_val_if() input validation |
Date: | Wed, 2 Dec 2020 16:58:23 +0100 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 |
On 12/2/20 4:26 PM, Stefan Hajnoczi wrote: > Do not validate input with g_return_val_if(). This API is intended for > checking programming errors and is compiled out with -DG_DISABLE_CHECKS. > > Use an explicit if statement for input validation so it cannot > accidentally be compiled out. > > Suggested-by: Markus Armbruster <armbru@redhat.com> > Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> > --- > block/export/vhost-user-blk-server.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
[Prev in Thread] | Current Thread | [Next in Thread] |