mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 13:25:43 +01:00
options: don't end default name with '-' in non-DEVELOPER mode.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
de37586a97
commit
aa9e15edb0
@ -777,16 +777,16 @@ void setup_color_and_alias(struct lightningd *ld)
|
||||
adjective %= ARRAY_SIZE(codename_adjective);
|
||||
|
||||
/* Only use 32 characters */
|
||||
name = tal_fmt(ld, "%s%s-",
|
||||
name = tal_fmt(ld, "%s%s",
|
||||
codename_adjective[adjective],
|
||||
codename_noun[noun]);
|
||||
#if DEVELOPER
|
||||
assert(strlen(name) < 32);
|
||||
int taillen = 32 - strlen(name);
|
||||
int taillen = 31 - strlen(name);
|
||||
if (taillen > strlen(version()))
|
||||
taillen = strlen(version());
|
||||
/* Fit as much of end of version() as possible */
|
||||
tal_append_fmt(&name, "%s",
|
||||
tal_append_fmt(&name, "-%s",
|
||||
version() + strlen(version()) - taillen);
|
||||
#endif
|
||||
assert(strlen(name) <= 32);
|
||||
|
Loading…
Reference in New Issue
Block a user