[PATCH] util: Avoid variable named 'truncate' shadowing global declaration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
---
Pushed under the build-breaker rule as trivial.

 src/util/virrotatingfile.c | 6 +++---
 src/util/virrotatingfile.h | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/util/virrotatingfile.c b/src/util/virrotatingfile.c
index 827b44b6f948..a32759abe66d 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 30cc8a540896..7848443101a6 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,
--
2.6.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]