summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kletzander <mkletzan@redhat.com>2015-11-30 15:30:33 +0100
committerMartin Kletzander <mkletzan@redhat.com>2015-11-30 15:32:47 +0100
commitde9ff3efe1f52c41c0bedaeb9ba6b7a83a0f166a (patch)
treebf2ef9a26ec887aaaaca7aa0d08fadb18c745bd2
parent8dd47ead18ba64ee231dcef0a54e1b6ad797051e (diff)
downloadlibvirt-de9ff3efe1f52c41c0bedaeb9ba6b7a83a0f166a.tar.gz
util: Avoid variable named 'truncate' shadowing global declaration
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
-rw-r--r--src/util/virrotatingfile.c6
-rw-r--r--src/util/virrotatingfile.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/util/virrotatingfile.c b/src/util/virrotatingfile.c
index 827b44b6f9..a32759abe6 100644
--- a/src/util/virrotatingfile.c
+++ b/src/util/virrotatingfile.c
@@ -219,7 +219,7 @@ virRotatingFileWriterDelete(virRotatingFileWriterPtr file)
* @path: the base path for files
* @maxlen: the maximum number of bytes to write before rollover
* @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
*
* Create a new object for writing data to a file with
@@ -235,7 +235,7 @@ virRotatingFileWriterPtr
virRotatingFileWriterNew(const char *path,
off_t maxlen,
size_t maxbackup,
- bool truncate,
+ bool trunc,
mode_t mode)
{
virRotatingFileWriterPtr file;
@@ -257,7 +257,7 @@ virRotatingFileWriterNew(const char *path,
file->maxbackup = maxbackup;
file->maxlen = maxlen;
- if (truncate &&
+ if (trunc &&
virRotatingFileWriterDelete(file) < 0)
goto error;
diff --git a/src/util/virrotatingfile.h b/src/util/virrotatingfile.h
index 30cc8a5408..7848443101 100644
--- a/src/util/virrotatingfile.h
+++ b/src/util/virrotatingfile.h
@@ -33,7 +33,7 @@ typedef virRotatingFileReader *virRotatingFileReaderPtr;
virRotatingFileWriterPtr virRotatingFileWriterNew(const char *path,
off_t maxlen,
size_t maxbackup,
- bool truncate,
+ bool trunc,
mode_t mode);
virRotatingFileReaderPtr virRotatingFileReaderNew(const char *path,