]> git.ipfire.org Git - thirdparty/rrdtool-1.x.git/commitdiff
Fix potential duplicate write_changes_to_disk() calls 2019-10
authorYong Li <30503431+yli-cpr@users.noreply.github.com>
Mon, 30 Sep 2019 12:16:43 +0000 (08:16 -0400)
committerTobias Oetiker <tobi@oetiker.ch>
Mon, 30 Sep 2019 20:30:15 +0000 (22:30 +0200)
Fix duplicate write_changes_to_disk() calls when HAVE_LIBRADOS is true and HAVE_MMAP is false

src/rrd_update.c

index 6cd023ed4fc4426835a5bf6c498023e581c72f3f..831b8eed4a4b2f00c77c4c5195db564004e74612 100644 (file)
@@ -918,6 +918,9 @@ static int _rrd_updatex(
 #ifdef HAVE_LIBRADOS
     if (rrd_file->rados)
       write_changes_to_disk(&rrd, rrd_file, version);
+#ifndef HAVE_MMAP
+    else
+#endif
 #endif
 #ifndef HAVE_MMAP
     if (write_changes_to_disk(&rrd, rrd_file, version) == -1) {