Skip to content

Commit 0932fee

Browse files
committed
server config BUGFIX temp ret value
Fixes CESNET/netopeer2#1750
1 parent 2866120 commit 0932fee

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/server_config.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2305,17 +2305,17 @@ nc_server_config_delete_substring(const char *haystack, const char *needle, cons
23052305
static int
23062306
nc_server_config_transport_params(const char *algorithm, char **alg_store, enum nc_operation op)
23072307
{
2308-
int ret = 0;
2308+
int ret = 0, r;
23092309
char *alg = NULL;
23102310

23112311
if (!strncmp(algorithm, "openssh-", 8)) {
23122312
/* if the name starts with openssh, convert it to it's original libssh accepted form */
2313-
ret = asprintf(&alg, "%[email protected]", algorithm + 8);
2314-
NC_CHECK_ERRMEM_GOTO(ret == -1, ret = 1; alg = NULL, cleanup);
2313+
r = asprintf(&alg, "%[email protected]", algorithm + 8);
2314+
NC_CHECK_ERRMEM_GOTO(r == -1, ret = 1; alg = NULL, cleanup);
23152315
} else if (!strncmp(algorithm, "libssh-", 7)) {
23162316
/* if the name starts with libssh, convert it to it's original libssh accepted form */
2317-
ret = asprintf(&alg, "%[email protected]", algorithm + 7);
2318-
NC_CHECK_ERRMEM_GOTO(ret == -1, ret = 1; alg = NULL, cleanup);
2317+
r = asprintf(&alg, "%[email protected]", algorithm + 7);
2318+
NC_CHECK_ERRMEM_GOTO(r == -1, ret = 1; alg = NULL, cleanup);
23192319
} else {
23202320
alg = strdup(algorithm);
23212321
NC_CHECK_ERRMEM_GOTO(!alg, ret = 1, cleanup);

0 commit comments

Comments
 (0)