On Wed, Nov 18, 2020 at 09:16:40AM +0000, Stefan Hajnoczi wrote:
Markus Armbruster pointed out that g_return_val_if() is meant for programming
errors. It must not be used for input validation since it can be compiled out.
Use explicit if statements instead.
This patch series converts vhost-user device backends that use
g_return_val_if() in get/set_config().
Stefan Hajnoczi (4):
contrib/vhost-user-blk: avoid g_return_val_if() input validation
contrib/vhost-user-gpu: avoid g_return_val_if() input validation
contrib/vhost-user-input: avoid g_return_val_if() input validation
block/export: avoid g_return_val_if() input validation
block/export/vhost-user-blk-server.c | 4 +++-
contrib/vhost-user-blk/vhost-user-blk.c | 4 +++-
contrib/vhost-user-gpu/vhost-user-gpu.c | 4 +++-
contrib/vhost-user-input/main.c | 4 +++-
4 files changed, 12 insertions(+), 4 deletions(-)
Reviewed-by: Stefano Garzarella <sgarz...@redhat.com>