From 5b2cb1ca7d153395bc26fd9051a0feee65cfbb06 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@1155 a5681a0c-68f1-0310-ab6d-d61299d08faa --- program/src/rrd_open.c | 2 ++ program/src/rrd_resize.c | 1 + 2 files changed, 3 insertions(+) diff --git a/program/src/rrd_open.c b/program/src/rrd_open.c index 4b9a0f92..a01b0754 100644 --- a/program/src/rrd_open.c +++ b/program/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/program/src/rrd_resize.c b/program/src/rrd_resize.c index 9dcfccab..c45ec143 100644 --- a/program/src/rrd_resize.c +++ b/program/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.30.2