runes: fix weird unnecessary zero-test.

This seems to be a cut & paste bug (mine, AFAICT!) from the command code:

```
	rune = rune_derive_start(cmd, master_rune,
				 tal_fmt(tmpctx, "%"PRIu64,
					 rune_counter ? *rune_counter : 0));
```

In that case, rune_counter was a pointer, which could be NULL.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2023-09-12 10:22:44 +09:30
parent 785fe973a6
commit 2765939adb
1 changed files with 2 additions and 1 deletions

View File

@ -569,7 +569,8 @@ static struct command_result *json_createrune(struct command *cmd,
ras = tal(cmd, struct rune_and_string);
ras->rune = rune_derive_start(cmd, cmd->ld->runes->master,
tal_fmt(tmpctx, "%"PRIu64, cmd->ld->runes->next_unique_id ? cmd->ld->runes->next_unique_id : 0));
tal_fmt(tmpctx, "%"PRIu64,
cmd->ld->runes->next_unique_id));
ras->runestr = rune_to_base64(tmpctx, ras->rune);
for (size_t i = 0; i < tal_count(restrs); i++)