logging: avoid variables called 'daemon' due to function clash

With some versions of GLibC / GCC, a variable called 'daemon'
will result in a warning about clashing with the function also
named 'daemon'. Rename it to 'dmn' to avoid the clash.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrange 2015-11-27 09:26:46 +00:00
parent 35b2a2d99a
commit 753346c5dd
2 changed files with 6 additions and 6 deletions

View File

@ -127,12 +127,12 @@ virLogDaemonFree(virLogDaemonPtr logd)
static void
virLogDaemonInhibitor(bool inhibit, void *opaque)
{
virLogDaemonPtr daemon = opaque;
virLogDaemonPtr dmn = opaque;
if (inhibit)
virNetDaemonAddShutdownInhibition(daemon->dmn);
virNetDaemonAddShutdownInhibition(dmn->dmn);
else
virNetDaemonRemoveShutdownInhibition(daemon->dmn);
virNetDaemonRemoveShutdownInhibition(dmn->dmn);
}
static virLogDaemonPtr
@ -177,9 +177,9 @@ virLogDaemonNew(virLogDaemonConfigPtr config, bool privileged)
virLogHandlerPtr
virLogDaemonGetHandler(virLogDaemonPtr daemon)
virLogDaemonGetHandler(virLogDaemonPtr dmn)
{
return daemon->handler;
return dmn->handler;
}

View File

@ -40,6 +40,6 @@ struct _virLogDaemonClient {
extern virLogDaemonPtr logDaemon;
virLogHandlerPtr virLogDaemonGetHandler(virLogDaemonPtr daemon);
virLogHandlerPtr virLogDaemonGetHandler(virLogDaemonPtr dmn);
#endif /* __VIR_LOG_DAEMON_H__ */