]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
file.h: Rename function argument to avoid C++ keyword clash.
authorSean Bright <sean@seanbright.com>
Fri, 24 May 2024 14:32:09 +0000 (10:32 -0400)
committerAsterisk Development Team <asteriskteam@digium.com>
Thu, 11 Jul 2024 13:23:24 +0000 (13:23 +0000)
Fixes #744

(cherry picked from commit d51a86dc91531d411b527e4af1116c76c7e4e66b)

include/asterisk/file.h
main/file.c

index 4fade8eb339258e991632a82a3659486a0d889c2..678f0d1f2fbf3caca6f9b0a0806c221e99f55cb7 100644 (file)
@@ -140,12 +140,13 @@ int ast_filecopy(const char *oldname, const char *newname, const char *fmt);
 
 /*!
  * \brief same as mkstemp, but return a FILE
- * \param template The template for the unique file name to generate. Modified in place to return the file name.
+ * \param template_name The template for the unique file name to generate.
+ *                      Modified in place to return the file name.
  * \param mode The mode for file permissions
  *
  * \return FILE handle to the temporary file on success or NULL if creation failed
  */
-FILE *ast_file_mkftemp(char *template, mode_t mode);
+FILE *ast_file_mkftemp(char *template_name, mode_t mode);
 
 /*!
  * \brief Create a temporary file located at path
index e4eacfe1fd0bcf675d78566fa397ec30139a5642..3b4efef94ab2ff75859625d0139e75a4d85f17d3 100644 (file)
@@ -184,11 +184,11 @@ int ast_format_def_unregister(const char *name)
        return res;
 }
 
-FILE *ast_file_mkftemp(char *template, mode_t mode)
+FILE *ast_file_mkftemp(char *template_name, mode_t mode)
 {
        FILE *p = NULL;
-       int pfd = mkstemp(template);
-       chmod(template, mode);
+       int pfd = mkstemp(template_name);
+       chmod(template_name, mode);
        if (pfd > -1) {
                p = fdopen(pfd, "w+");
                if (!p) {