]> code.delx.au - pulseaudio/blobdiff - src/pulsecore/pid.c
Use pa_hashmap_remove_and_free() where appropriate
[pulseaudio] / src / pulsecore / pid.c
index 213e798383d05cd90ea44ca604c5975afa653ed0..e347884ad7ae41cef287d7c42e54a5dedaaa7357 100644 (file)
@@ -40,7 +40,6 @@
 #endif
 
 #include <pulse/xmalloc.h>
-#include <pulse/util.h>
 
 #include <pulsecore/core-error.h>
 #include <pulsecore/core-util.h>
@@ -148,7 +147,7 @@ static int proc_name_ours(pid_t pid, const char *procname) {
         return -1;
     } else {
         char *expected;
-        pa_bool_t good;
+        bool good;
         char stored[64];
 
         if (!(fgets(stored, sizeof(stored), f))) {
@@ -209,7 +208,7 @@ int pa_pid_file_create(const char *procname) {
         int ours = 1;
 
 #ifdef OS_IS_WIN32
-        if ((process = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, pid)) != NULL) {
+        if ((process = OpenProcess(PROCESS_QUERY_INFORMATION, false, pid)) != NULL) {
             CloseHandle(process);
 #else
         if (kill(pid, 0) >= 0 || errno != ESRCH) {
@@ -218,7 +217,7 @@ int pa_pid_file_create(const char *procname) {
             if (procname)
                 if ((ours = proc_name_ours(pid, procname)) < 0) {
                     pa_log_warn("Could not check to see if pid %lu is a pulseaudio process. "
-                                "Asssuming it is and the daemon is already running.", (unsigned long) pid);
+                                "Assuming it is and the daemon is already running.", (unsigned long) pid);
                     goto fail;
                 }
 
@@ -321,7 +320,7 @@ fail:
 }
 
 /* Check whether the daemon is currently running, i.e. if a PID file
- * exists and the PID therein too. Returns 0 on succcess, -1
+ * exists and the PID therein too. Returns 0 on success, -1
  * otherwise. If pid is non-NULL and a running daemon was found,
  * return its PID therein */
 int pa_pid_file_check_running(pid_t *pid, const char *procname) {