From: Peter Krempa Date: Tue, 19 Jun 2012 13:55:28 +0000 (+0200) Subject: error: Fix typos in argument checking macros X-Git-Tag: v0.9.13-rc1~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fbc72a1d0bb7c0b67cac6f3d845d1ba4eb71fd9c;p=thirdparty%2Flibvirt.git 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. --- 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; \ } \