From 6586ba5579dbe4eb360bc646572e58350d12bffb Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Tue, 16 Apr 2019 21:40:03 +0200 Subject: Cleanup: move parse_location() declaration into header file The parse_location() function was used in three places. In two of them, the declaration was in the translation unit. Instead, move the declaration into a header file, to avoid duplication and the possibility of inconsistencies. The "units.h" header was chosen as this is where location_t is defined. Moreover, make the string argument to parse_location() "const char *", so that it can be used on non-owned buffers. Signed-off-by: Berthold Stoeger --- core/libdivecomputer.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'core/libdivecomputer.c') diff --git a/core/libdivecomputer.c b/core/libdivecomputer.c index bb70f50a2..a870317b1 100644 --- a/core/libdivecomputer.c +++ b/core/libdivecomputer.c @@ -570,8 +570,6 @@ static void set_dc_serial(struct divecomputer *dc, const char *serial) dc->deviceid = calculate_string_hash(serial); } -extern void parse_location(char *, location_t *); - static void parse_string_field(device_data_t *devdata, struct dive *dive, dc_field_string_t *str) { // Our dive ID is the string hash of the "Dive ID" string -- cgit v1.2.3-70-g09d2