From 616c3eccfdda90ea6dc15bad47f68beb2634f0ad Mon Sep 17 00:00:00 2001 From: Alasdair Kergon Date: Mon, 8 Jan 2007 15:35:08 +0000 Subject: [PATCH] fix last checkin --- daemons/dmeventd/dmeventd.c | 6 ++++-- libdm/libdm-string.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/daemons/dmeventd/dmeventd.c b/daemons/dmeventd/dmeventd.c index 8b642b931..2c9277984 100644 --- a/daemons/dmeventd/dmeventd.c +++ b/daemons/dmeventd/dmeventd.c @@ -40,6 +40,8 @@ #include #include #include + +#include #include #include #include /* for htonl, ntohl */ @@ -1453,7 +1455,7 @@ int main(int argc, char *argv[]) init_fifos(&fifos); - pthread_mutex_init(&mutex, NULL); + pthread_mutex_init(&_global_mutex, NULL); #ifdef MCL_CURRENT if (mlockall(MCL_CURRENT | MCL_FUTURE) == -1) @@ -1481,7 +1483,7 @@ int main(int argc, char *argv[]) #ifdef MCL_CURRENT munlockall(); #endif - pthread_mutex_destroy(&_mutex); + pthread_mutex_destroy(&_global_mutex); syslog(LOG_INFO, "dmeventd shutting down."); closelog(); diff --git a/libdm/libdm-string.c b/libdm/libdm-string.c index 17defaca3..098fc0d9d 100644 --- a/libdm/libdm-string.c +++ b/libdm/libdm-string.c @@ -126,6 +126,6 @@ char *dm_basename(const char *path) { char *p = strrchr(path, '/'); - return p ? p + 1 : path; + return p ? p + 1 : (char *) path; }