From 61f3b98910da20d4f0935d34a69fd203c092bd8a Mon Sep 17 00:00:00 2001 From: Ralph Corderoy Date: Thu, 20 Oct 2016 00:24:20 +0100 Subject: [PATCH] Replace strlen(), malloc(), and sprintf() with concat(). --- sbr/oauth_prof.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/sbr/oauth_prof.c b/sbr/oauth_prof.c index e0fd7584..ab8bc5aa 100644 --- a/sbr/oauth_prof.c +++ b/sbr/oauth_prof.c @@ -139,10 +139,7 @@ mh_oauth_cred_fn(const char *svc) free(component); if (result == NULL) { - result = mh_xmalloc(sizeof "oauth-" - 1 - + strlen(svc) - + 1 /* '\0' */); - sprintf(result, "oauth-%s", svc); + result = concat("oauth-", svc, NULL); result_if_allocated = result; } else { result_if_allocated = NULL; -- 2.56.0