From f4559ba9fa4610b56f27ffb20eb872908e987baf Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Mon, 12 Sep 2011 20:37:32 -0700 Subject: Plot a sick kind of temperature curve .. without the actual text, because I'm a "random plots that cannot actually be interpreted" kind of guy. Signed-off-by: Linus Torvalds --- dive.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'dive.c') diff --git a/dive.c b/dive.c index 32ea2ffe1..b7f612936 100644 --- a/dive.c +++ b/dive.c @@ -117,7 +117,6 @@ struct dive *fixup_dive(struct dive *dive) int maxdepth = 0, mintemp = 0; int lastdepth = 0; int lasttemp = 0; - temperature_t *redundant_temp = NULL; for (i = 0; i < dive->samples; i++) { struct sample *sample = dive->sample + i; @@ -141,17 +140,12 @@ struct dive *fixup_dive(struct dive *dive) /* * If we have consecutive identical * temperature readings, throw away - * the redundant ones. We care about - * the "edges" only. + * the redundant ones. */ - if (lasttemp == temp) { - if (redundant_temp) - redundant_temp->mkelvin = 0; - redundant_temp = &sample->temperature; - } else { - redundant_temp = NULL; + if (lasttemp == temp) + sample->temperature.mkelvin = 0; + else lasttemp = temp; - } if (!mintemp || temp < mintemp) mintemp = temp; -- cgit v1.2.3-70-g09d2