[PATCH 03/13] Remove some dead code

Anton Lundin glance at acc.umu.se
Tue Dec 10 15:53:27 UTC 2013


last_pressure is updated a couple of lines later, so no need to do it
here.

Signed-off-by: Anton Lundin <glance at acc.umu.se>
---
 profile.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/profile.c b/profile.c
index 6e30197..5c77e60 100644
--- a/profile.c
+++ b/profile.c
@@ -1390,12 +1390,9 @@ void compare_samples(struct plot_data *e1, struct plot_data *e2, char *buf, int
 		if (data->depth > max_depth)
 			max_depth = data->depth;
 		/* Try to detect gas changes */
-		if (GET_PRESSURE(data) > last_pressure+2000)
-			last_pressure = GET_PRESSURE(data);
-		else
+		if (GET_PRESSURE(data) < last_pressure+2000)
 			bar_used += last_pressure-GET_PRESSURE(data);
 
-
 		count+=1;
 		last_sec = data->sec;
 		last_pressure = GET_PRESSURE(data);
-- 
1.8.3.2



More information about the subsurface mailing list