From 271be77064640b1daa3408885d60b8bead1126ad Mon Sep 17 00:00:00 2001 From: oetiker Date: Tue, 17 Jul 2007 21:46:00 +0000 Subject: [PATCH] added comment on float cookie git-svn-id: svn://svn.oetiker.ch/rrdtool/trunk/program@1155 a5681a0c-68f1-0310-ab6d-d61299d08faa --- src/rrd_open.c | 2 ++ src/rrd_resize.c | 1 + 2 files changed, 3 insertions(+) diff --git a/src/rrd_open.c b/src/rrd_open.c index 4b9a0f9..a01b075 100644 --- a/src/rrd_open.c +++ b/src/rrd_open.c @@ -90,6 +90,8 @@ rrd_file_t *rrd_open( off_t newfile_size = 0; if (rdwr & RRD_CREAT) { + /* yes bad inline signaling alert, we are using the + floatcookie to pass the size in ... only used in resize */ newfile_size = (off_t) rrd->stat_head->float_cookie; free(rrd->stat_head); } diff --git a/src/rrd_resize.c b/src/rrd_resize.c index 9dcfcca..c45ec14 100644 --- a/src/rrd_resize.c +++ b/src/rrd_resize.c @@ -82,6 +82,7 @@ int rrd_resize( return (-1); } /* the size of the new file */ + /* yes we are abusing the float cookie for this, aargh */ if ((rrdnew.stat_head = calloc(1, sizeof(stat_head_t))) == NULL) { rrd_set_error("allocating stat_head for new RRD"); rrd_free(&rrdold); -- 2.11.0