mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
util: Avoid variable named 'truncate' shadowing global declaration
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
8dd47ead18
commit
de9ff3efe1
@ -219,7 +219,7 @@ virRotatingFileWriterDelete(virRotatingFileWriterPtr file)
|
|||||||
* @path: the base path for files
|
* @path: the base path for files
|
||||||
* @maxlen: the maximum number of bytes to write before rollover
|
* @maxlen: the maximum number of bytes to write before rollover
|
||||||
* @maxbackup: number of backup files to keep when rolling over
|
* @maxbackup: number of backup files to keep when rolling over
|
||||||
* @truncate: whether to truncate the current files when opening
|
* @trunc: whether to truncate the current files when opening
|
||||||
* @mode: the file mode to use for creating new files
|
* @mode: the file mode to use for creating new files
|
||||||
*
|
*
|
||||||
* Create a new object for writing data to a file with
|
* Create a new object for writing data to a file with
|
||||||
@ -235,7 +235,7 @@ virRotatingFileWriterPtr
|
|||||||
virRotatingFileWriterNew(const char *path,
|
virRotatingFileWriterNew(const char *path,
|
||||||
off_t maxlen,
|
off_t maxlen,
|
||||||
size_t maxbackup,
|
size_t maxbackup,
|
||||||
bool truncate,
|
bool trunc,
|
||||||
mode_t mode)
|
mode_t mode)
|
||||||
{
|
{
|
||||||
virRotatingFileWriterPtr file;
|
virRotatingFileWriterPtr file;
|
||||||
@ -257,7 +257,7 @@ virRotatingFileWriterNew(const char *path,
|
|||||||
file->maxbackup = maxbackup;
|
file->maxbackup = maxbackup;
|
||||||
file->maxlen = maxlen;
|
file->maxlen = maxlen;
|
||||||
|
|
||||||
if (truncate &&
|
if (trunc &&
|
||||||
virRotatingFileWriterDelete(file) < 0)
|
virRotatingFileWriterDelete(file) < 0)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ typedef virRotatingFileReader *virRotatingFileReaderPtr;
|
|||||||
virRotatingFileWriterPtr virRotatingFileWriterNew(const char *path,
|
virRotatingFileWriterPtr virRotatingFileWriterNew(const char *path,
|
||||||
off_t maxlen,
|
off_t maxlen,
|
||||||
size_t maxbackup,
|
size_t maxbackup,
|
||||||
bool truncate,
|
bool trunc,
|
||||||
mode_t mode);
|
mode_t mode);
|
||||||
|
|
||||||
virRotatingFileReaderPtr virRotatingFileReaderNew(const char *path,
|
virRotatingFileReaderPtr virRotatingFileReaderNew(const char *path,
|
||||||
|
Loading…
Reference in New Issue
Block a user