From 8a394b9db42a21f684c6ae85005a55c29d060c38 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Tue, 14 Aug 2018 14:09:30 -0400 Subject: Filter: constify doFilter() argument Conceptually, the doFilter() functions shouldn't modify the dive they test. Therefore, make the argument const. To do this, constify the parameter of get_dive_location(), which likewise seems to be the right thing to do. Signed-off-by: Berthold Stoeger --- core/dive.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core/dive.c') diff --git a/core/dive.c b/core/dive.c index da4b19346..482ba585b 100644 --- a/core/dive.c +++ b/core/dive.c @@ -4202,9 +4202,9 @@ const char *get_dive_country(struct dive *dive) return NULL; } -char *get_dive_location(struct dive *dive) +const char *get_dive_location(const struct dive *dive) { - struct dive_site *ds = get_dive_site_by_uuid(dive->dive_site_uuid); + const struct dive_site *ds = get_dive_site_by_uuid(dive->dive_site_uuid); if (ds && ds->name) return ds->name; return NULL; -- cgit v1.2.3-70-g09d2