From acec6c3d026cd30d399a32a2114ffa3254d09bcd Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Wed, 5 Aug 2009 12:04:26 +0200 Subject: [PATCH] Avoid a warning if compiling without inotify * src/xm_internal.c: split the implementations of xenInotifyActive() --- src/xm_internal.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/xm_internal.c b/src/xm_internal.c index 03cee9d6ed..c869120acf 100644 --- a/src/xm_internal.c +++ b/src/xm_internal.c @@ -122,18 +122,18 @@ struct xenUnifiedDriver xenXMDriver = { virReportErrorHelper(conn, VIR_FROM_XENXM, code, __FILE__, \ __FUNCTION__, __LINE__, fmt) +#ifndef WITH_XEN_INOTIFY +static int xenInotifyActive(virConnectPtr conn ATTRIBUTE_UNUSED) +{ + return 0; +} +#else static int xenInotifyActive(virConnectPtr conn) { - int ret; -#ifndef WITH_XEN_INOTIFY - ret = 0; -#else - xenUnifiedPrivatePtr priv = (xenUnifiedPrivatePtr) conn->privateData; - ret = (priv->inotifyWatch > 0); -#endif - - return ret; + xenUnifiedPrivatePtr priv = (xenUnifiedPrivatePtr) conn->privateData; + return priv->inotifyWatch > 0; } +#endif /* Convenience method to grab a int from the config file object */ static int xenXMConfigGetBool(virConnectPtr conn,