diff options
Diffstat (limited to 'core/libdivecomputer.c')
-rw-r--r-- | core/libdivecomputer.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/libdivecomputer.c b/core/libdivecomputer.c index be0bb01a5..a666ca667 100644 --- a/core/libdivecomputer.c +++ b/core/libdivecomputer.c @@ -618,9 +618,9 @@ static dc_status_t libdc_header_parser(dc_parser_t *parser, device_data_t *devda } // Parse the divetime. - const char *date_string = get_dive_date_c_string(dive->when); + char *date_string = get_dive_date_c_string(dive->when); dev_info(devdata, translate("gettextFromC", "Dive %d: %s"), import_dive_number, date_string); - free((void *)date_string); + free(date_string); unsigned int divetime = 0; rc = dc_parser_get_field(parser, DC_FIELD_DIVETIME, 0, &divetime); @@ -802,9 +802,9 @@ static int dive_cb(const unsigned char *data, unsigned int size, /* If we already saw this dive, abort. */ if (!devdata->force_download && find_dive(&dive->dc)) { - const char *date_string = get_dive_date_c_string(dive->when); + char *date_string = get_dive_date_c_string(dive->when); dev_info(devdata, translate("gettextFromC", "Already downloaded dive at %s"), date_string); - free((void *)date_string); + free(date_string); goto error_exit; } |