mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-02 19:16:15 +00:00
file.h: Rename function argument to avoid C++ keyword clash.
Fixes #744
This commit is contained in:
committed by
asterisk-org-access-app[bot]
parent
85241bd229
commit
f3449f3370
@@ -140,12 +140,13 @@ int ast_filecopy(const char *oldname, const char *newname, const char *fmt);
|
|||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief same as mkstemp, but return a FILE
|
* \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
|
* \param mode The mode for file permissions
|
||||||
*
|
*
|
||||||
* \return FILE handle to the temporary file on success or NULL if creation failed
|
* \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
|
* \brief Create a temporary file located at path
|
||||||
|
@@ -184,11 +184,11 @@ int ast_format_def_unregister(const char *name)
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
FILE *ast_file_mkftemp(char *template, mode_t mode)
|
FILE *ast_file_mkftemp(char *template_name, mode_t mode)
|
||||||
{
|
{
|
||||||
FILE *p = NULL;
|
FILE *p = NULL;
|
||||||
int pfd = mkstemp(template);
|
int pfd = mkstemp(template_name);
|
||||||
chmod(template, mode);
|
chmod(template_name, mode);
|
||||||
if (pfd > -1) {
|
if (pfd > -1) {
|
||||||
p = fdopen(pfd, "w+");
|
p = fdopen(pfd, "w+");
|
||||||
if (!p) {
|
if (!p) {
|
||||||
|
Reference in New Issue
Block a user