[PATCH 2/4] Make cylinder_nodata() take a const cylinder pointer
Linus Torvalds
torvalds at linux-foundation.org
Sat Apr 2 14:37:10 PDT 2016
From: Linus Torvalds <torvalds at linux-foundation.org>
Date: Sat, 2 Apr 2016 13:50:17 -0500
Subject: [PATCH 2/4] Make cylinder_nodata() take a const cylinder pointer
Some of the gas mix cleanups I'm doing are in code that uses const
pointers, and wants to use this.
Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
---
Also obviously safe and could be applied to the 4.5.x series
subsurface-core/dive.h | 2 +-
subsurface-core/equipment.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/subsurface-core/dive.h b/subsurface-core/dive.h
index 204d348199c0..7985799439f2 100644
--- a/subsurface-core/dive.h
+++ b/subsurface-core/dive.h
@@ -856,7 +856,7 @@ struct ws_info_t {
};
extern struct ws_info_t ws_info[100];
-extern bool cylinder_nodata(cylinder_t *cyl);
+extern bool cylinder_nodata(const cylinder_t *cyl);
extern bool cylinder_none(void *_data);
extern bool weightsystem_none(void *_data);
extern bool no_weightsystems(weightsystem_t *ws);
diff --git a/subsurface-core/equipment.c b/subsurface-core/equipment.c
index 9f3e490390e5..1521c2309b84 100644
--- a/subsurface-core/equipment.c
+++ b/subsurface-core/equipment.c
@@ -53,7 +53,7 @@ void add_weightsystem_description(weightsystem_t *weightsystem)
}
}
-bool cylinder_nodata(cylinder_t *cyl)
+bool cylinder_nodata(const cylinder_t *cyl)
{
return !cyl->type.size.mliter &&
!cyl->type.workingpressure.mbar &&
--
2.8.0.rc4.303.g3931579
More information about the subsurface
mailing list