]> xenbits.xensource.com Git - libvirt.git/commitdiff
util: Avoid variable named 'truncate' shadowing global declaration
authorMartin Kletzander <mkletzan@redhat.com>
Mon, 30 Nov 2015 14:30:33 +0000 (15:30 +0100)
committerMartin Kletzander <mkletzan@redhat.com>
Mon, 30 Nov 2015 14:32:47 +0000 (15:32 +0100)
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
src/util/virrotatingfile.c
src/util/virrotatingfile.h

index 827b44b6f94856d5c9dfa6aacb29e21ce03e4f90..a32759abe66d069d60ea4bbc27dd4fd8d0f09a32 100644 (file)
@@ -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;
 
index 30cc8a54089661a9c8b964edc43ba229769ee952..7848443101a6142b7d212b895576c688d7662477 100644 (file)
@@ -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,