From fbc72a1d0bb7c0b67cac6f3d845d1ba4eb71fd9c Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Tue, 19 Jun 2012 15:55:28 +0200 Subject: [PATCH] error: Fix typos in argument checking macros Macro virCheckNullArgGoto is supposed to check for NULL argument but checks non-NULL instead. Macro virCheckNonNullArgReturn reports error as if the argument should be NULL when it shouldn't. --- src/internal.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/internal.h b/src/internal.h index 1b1598b08e..60be95df80 100644 --- a/src/internal.h +++ b/src/internal.h @@ -242,13 +242,13 @@ # define virCheckNonNullArgReturn(argname, retval) \ do { \ if (argname == NULL) { \ - virReportInvalidNullArg(argname); \ + virReportInvalidNonNullArg(argname); \ return retval; \ } \ } while (0) # define virCheckNullArgGoto(argname, label) \ do { \ - if (argname == NULL) { \ + if (argname != NULL) { \ virReportInvalidNullArg(argname); \ goto label; \ } \ -- GitLab