diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.c.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.c.mustache index f8dc6afa9efd..015a915afdff 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.c.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.c.mustache @@ -183,15 +183,10 @@ char *assembleTargetUrl(char *basePath, int operationParameterLength = 0; int basePathLength = strlen(basePath); - bool slashNeedsToBeAppendedToBasePath = false; if(operationParameter != NULL) { operationParameterLength = (1 + strlen(operationParameter)); } - if(basePath[strlen(basePath) - 1] != '/') { - slashNeedsToBeAppendedToBasePath = true; - basePathLength++; - } char *targetUrl = malloc( diff --git a/samples/client/petstore/c/src/apiClient.c b/samples/client/petstore/c/src/apiClient.c index f3ecf73ed80a..355e4eab8617 100644 --- a/samples/client/petstore/c/src/apiClient.c +++ b/samples/client/petstore/c/src/apiClient.c @@ -137,15 +137,10 @@ char *assembleTargetUrl(char *basePath, int operationParameterLength = 0; int basePathLength = strlen(basePath); - bool slashNeedsToBeAppendedToBasePath = false; if(operationParameter != NULL) { operationParameterLength = (1 + strlen(operationParameter)); } - if(basePath[strlen(basePath) - 1] != '/') { - slashNeedsToBeAppendedToBasePath = true; - basePathLength++; - } char *targetUrl = malloc(