Avoid a warning if compiling without inotify

* src/xm_internal.c: split the implementations of xenInotifyActive()
This commit is contained in:
Daniel P. Berrange 2009-08-05 12:04:26 +02:00 committed by Daniel Veillard
parent 3879b33447
commit acec6c3d02
1 changed files with 9 additions and 9 deletions

View File

@ -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,