if (priv->watch != -1)
virEventRemoveHandle(priv->watch);
- if (priv->mdevctlTimeout > 0)
+ if (priv->mdevctlTimeout != -1)
virEventRemoveTimeout(priv->mdevctlTimeout);
if (!priv->udev_monitor)
return NULL;
}
+ ret->mdevctlTimeout = -1;
ret->watch = -1;
return ret;
}
udevEventData *priv = opaque;
virThread thread;
- if (priv->mdevctlTimeout > 0) {
+ if (priv->mdevctlTimeout != -1) {
virEventRemoveTimeout(priv->mdevctlTimeout);
priv->mdevctlTimeout = -1;
}
bool force)
{
if (!force) {
- if (data->mdevctlTimeout > 0)
+ if (data->mdevctlTimeout != -1)
virEventRemoveTimeout(data->mdevctlTimeout);
data->mdevctlTimeout = virEventAddTimeout(100, launchMdevctlUpdateThread,
data, NULL);