From: Fabian Keil <fk@fabiankeil.de>
Date: Sun, 7 Jun 2020 15:42:00 +0000 (+0200)
Subject: write_pid_file(): Rename pidfile to pid_file
X-Git-Tag: v_3_0_29~295
X-Git-Url: http://www.privoxy.org/gitweb/%22https:/developer-manual/faq/@default-cgi@/diff?a=commitdiff_plain;h=dbfbb023294ebd16a3844cf506d4b70275f5cf25;p=privoxy.git

write_pid_file(): Rename pidfile to pid_file

So it doesn't shadow the global pidfile.
---

diff --git a/miscutil.c b/miscutil.c
index 9af7bed3..eabf7b1e 100644
--- a/miscutil.c
+++ b/miscutil.c
@@ -218,18 +218,18 @@ void *malloc_or_die(size_t buffer_size)
  *                Exits if the file can't be opened
  *
  * Parameters  :
- *          1  :  pidfile = Path of the pidfile that gets created.
+ *          1  :  pid_file = Path of the pid file that gets created.
  *
  * Returns     :  N/A
  *
  *********************************************************************/
-void write_pid_file(const char *pidfile)
+void write_pid_file(const char *pid_file)
 {
    FILE   *fp;
 
-   if ((fp = fopen(pidfile, "w")) == NULL)
+   if ((fp = fopen(pid_file, "w")) == NULL)
    {
-      log_error(LOG_LEVEL_FATAL, "can't open pidfile '%s': %E", pidfile);
+      log_error(LOG_LEVEL_FATAL, "can't open pid file '%s': %E", pid_file);
    }
    else
    {
diff --git a/miscutil.h b/miscutil.h
index 4add05d1..b738641c 100644
--- a/miscutil.h
+++ b/miscutil.h
@@ -50,7 +50,7 @@ extern char *strdup_or_die(const char *str);
 extern void *malloc_or_die(size_t buffer_size);
 
 #if defined(unix)
-extern void write_pid_file(const char *pidfile);
+extern void write_pid_file(const char *pid_file);
 #endif /* unix */
 
 extern unsigned int hash_string(const char* s);