]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- coding style
authorArvin Schnell <aschnell@suse.de>
Mon, 25 Apr 2022 07:05:11 +0000 (09:05 +0200)
committerArvin Schnell <aschnell@suse.de>
Mon, 25 Apr 2022 07:05:11 +0000 (09:05 +0200)
snapper/AsciiFile.cc

index 9bcde827799ff13237c431381d77036ed0c8feda..7dd9713570453c7ac7156c104dcf609558e58d02 100644 (file)
@@ -530,7 +530,7 @@ namespace snapper
        gzFile gz_file = nullptr;
 
        vector<char> buffer;
-       size_t buffer_fill = 0;         // position to which the buffer is full
+       size_t buffer_fill = 0;         // position to which the buffer is filled
 
        void write_buffer();
 
@@ -644,18 +644,18 @@ namespace snapper
 
        while (!tmp.empty())
        {
-           // still available in input buffer
-           size_t in_avail = buffer.size() - buffer_fill;
+           // still available in buffer
+           size_t avail = buffer.size() - buffer_fill;
 
-           // how much to copy into input buffer
-           size_t to_copy = min(in_avail, tmp.size());
+           // how much to copy into buffer
+           size_t to_copy = min(avail, tmp.size());
 
-           // copy into input buffer and erase in tmp
+           // copy into buffer and erase in tmp
            memcpy(buffer.data() + buffer_fill, tmp.data(), to_copy);
            buffer_fill += to_copy;
            tmp.erase(0, to_copy);
 
-           // if input buffer is full, compress it and write to disk
+           // if buffer is full, compress it and write to disk
            if (buffer_fill == buffer.size())
                write_buffer();
        }