There are still two places where we are using 1bit width unsigned
integer to store a boolean. There's no real need for this and these
occurrences can be replaced with 'bool'.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
struct _virInterfaceObj {
virMutex lock;
- unsigned int active:1; /* 1 if interface is active (up) */
+ bool active; /* true if interface is active (up) */
virInterfaceDefPtr def; /* The interface definition */
};
virInterfaceObjPtr *objs;
};
-static inline int
+static inline bool
virInterfaceObjIsActive(const virInterfaceObj *iface)
{
return iface->active;
unsigned int keepaliveCount;
bool keepaliveRequired;
- unsigned int quit :1;
+ bool quit;
#ifdef WITH_GNUTLS
virNetTLSContextPtr tls;
if (!srv->autoShutdownInhibitions) {
VIR_DEBUG("Automatic shutdown triggered");
- srv->quit = 1;
+ srv->quit = true;
}
virObjectUnlock(srv);
virNetServerMDNSStart(srv->mdns) < 0)
goto cleanup;
- srv->quit = 0;
+ srv->quit = false;
if (srv->autoShutdownTimeout &&
(timerid = virEventAddTimeout(-1,
virObjectLock(srv);
VIR_DEBUG("Quit requested %p", srv);
- srv->quit = 1;
+ srv->quit = true;
virObjectUnlock(srv);
}