From a8f5cdc294d1af540ecd47979f8516f02e278b3b Mon Sep 17 00:00:00 2001 From: Ken Sedgwick Date: Thu, 30 Jan 2020 16:20:38 -0800 Subject: [PATCH] lightningd: better short daemon name w/ tal_strdup. --- lightningd/lightningd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lightningd/lightningd.c b/lightningd/lightningd.c index eec2995ab483..3b2ac1520e55 100644 --- a/lightningd/lightningd.c +++ b/lightningd/lightningd.c @@ -320,8 +320,7 @@ const char *subdaemon_path(const tal_t *ctx, const struct lightningd *ld, const */ size_t pfxlen = strlen("lightning_"); assert(strlen(name) > pfxlen); - const char *short_name = - tal_strndup(ctx, name + pfxlen, strlen(name) - pfxlen); + const char *short_name = tal_strdup(ctx, name + pfxlen); /* Is there an alternate path for this subdaemon? */ const char *dpath;