From 2be241a77f5c4534ed59b576b4fce7d16c7362ea Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 4 Jun 2022 11:51:35 +0300 Subject: [PATCH 57/57] cvercmp: Update to match upstream 1.0.5 release See osdn #44720 Signed-off-by: Marko Lindqvist --- dependencies/cvercmp/README.cvercmp | 4 ++-- dependencies/cvercmp/cvercmp.c | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dependencies/cvercmp/README.cvercmp b/dependencies/cvercmp/README.cvercmp index 6026a32569..5667c2db62 100644 --- a/dependencies/cvercmp/README.cvercmp +++ b/dependencies/cvercmp/README.cvercmp @@ -5,5 +5,5 @@ Homepage: https://www.cazfi.net/other/cvercmp.html As the copyright holder, cazfi has granted freeciv project right to use the provided version under GPLv2+. -Freeciv's current version is about the same as upstream release 1.0.4, -with some later modifications. +Freeciv's current version is about the same as upstream release 1.0.5, +with some modifications. diff --git a/dependencies/cvercmp/cvercmp.c b/dependencies/cvercmp/cvercmp.c index f2d5d6912a..8ca35ed042 100644 --- a/dependencies/cvercmp/cvercmp.c +++ b/dependencies/cvercmp/cvercmp.c @@ -1,6 +1,6 @@ /********************************************************* * * -* (c) 2011-2015 Marko Lindqvist * +* (c) 2011-2016 Marko Lindqvist * * * * Version contributed to Freeciv has been made available * * under GNU Public License; either version 2, or * @@ -237,11 +237,11 @@ static char **cvercmp_ver_tokenize(const char *ver) num++; } - tokens = calloc(sizeof(char *), num + 1); + tokens = (char **) calloc(sizeof(char *), num + 1); for (i = 0, idx = 0; i < num; i++) { tokenlen = cvercmp_next_token(ver + idx); - tokens[i] = malloc(sizeof(char) * (tokenlen + 1)); + tokens[i] = (char *) malloc(sizeof(char) * (tokenlen + 1)); strncpy(tokens[i], ver + idx, tokenlen); tokens[i][tokenlen] = '\0'; idx += tokenlen + 1; /* Skip character separating tokens. */ @@ -281,11 +281,11 @@ static char **cvercmp_ver_subtokenize(const char *ver) num++; } - tokens = calloc(sizeof(char *), num + 1); + tokens = (char **) calloc(sizeof(char *), num + 1); for (i = 0, idx = 0; i < num; i++) { tokenlen = cvercmp_next_subtoken(ver + idx); - tokens[i] = malloc(sizeof(char) * (tokenlen + 1)); + tokens[i] = (char *) malloc(sizeof(char) * (tokenlen + 1)); if (tokenlen > 0) { strncpy(tokens[i], ver + idx, tokenlen); } -- 2.35.1