Code

patches/bts498183-segfault-madvise: Removed unnecessary whitespace changes. debian/1.3.1-4
authorSebastian Harl <sh@tokkee.org>
Fri, 26 Sep 2008 11:23:20 +0000 (13:23 +0200)
committerSebastian Harl <sh@tokkee.org>
Fri, 26 Sep 2008 11:23:20 +0000 (13:23 +0200)
debian/patches/bts498183-segfault-madvise

index 8d381effa240b8e3a822c2ff1b382d35a38655e1..b0697bf0c9ed8ae8bfa1aad8072c5a4d3c4e16f3 100644 (file)
@@ -1,24 +1,18 @@
 diff a/src/rrd_open.c b/src/rrd_open.c
 --- a/src/rrd_open.c
 +++ b/src/rrd_open.c
-@@ -363,14 +363,19 @@ void rrd_dontneed(
+@@ -363,6 +363,8 @@ void rrd_dontneed(
              rrd->rra_def[i].row_cnt * rrd->stat_head->ds_cnt *
              sizeof(rrd_value_t);
      }
 +
 +    if (dontneed_start < rrd_file->file_len) {
  #ifdef USE_MADVISE
--    madvise(rrd_file->file_start + dontneed_start,
--            rrd_file->file_len - dontneed_start, MADV_DONTNEED);
-+          madvise(rrd_file->file_start + dontneed_start,
-+                  rrd_file->file_len - dontneed_start, MADV_DONTNEED);
- #endif
- #ifdef HAVE_POSIX_FADVISE
--    posix_fadvise(rrd_file->fd, dontneed_start,
--                  rrd_file->file_len - dontneed_start, POSIX_FADV_DONTNEED);
-+          posix_fadvise(rrd_file->fd, dontneed_start,
-+                        rrd_file->file_len - dontneed_start,
-+                        POSIX_FADV_DONTNEED);
+     madvise(rrd_file->file_start + dontneed_start,
+             rrd_file->file_len - dontneed_start, MADV_DONTNEED);
+@@ -371,6 +373,8 @@ void rrd_dontneed(
+     posix_fadvise(rrd_file->fd, dontneed_start,
+                   rrd_file->file_len - dontneed_start, POSIX_FADV_DONTNEED);
  #endif
 +    }
 +