write_pid_file(): Rename pidfile to pid_file
authorFabian Keil <fk@fabiankeil.de>
Sun, 7 Jun 2020 15:42:00 +0000 (17:42 +0200)
committerFabian Keil <fk@fabiankeil.de>
Mon, 8 Jun 2020 13:34:36 +0000 (15:34 +0200)
So it doesn't shadow the global pidfile.

miscutil.c
miscutil.h

index 9af7bed..eabf7b1 100644 (file)
@@ -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
    {
index 4add05d..b738641 100644 (file)
@@ -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);