renepay: Use macros instead of manual format types

Fixes 32-bit builds:

```
In file included from plugins/renepay/pay.c:5:
./plugins/renepay/pay_flow.h: In function 'fmt_payflow_key':
./plugins/renepay/pay_flow.h:54:17: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'u64' {aka 'long long unsigned int'} [-Werror=format=]
   54 |                 "key: groupid=%ld, partid=%ld, payment_hash=%s",
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   55 |                 k->groupid,k->partid,
      |                 ~~~~~~~~~~
      |                  |
      |                  u64 {aka long long unsigned int}
```

etc
This commit is contained in:
Dusty Daemon
2023-08-03 15:35:54 -04:00
committed by Rusty Russell
parent 881d7efd6e
commit 7c9f5e9847
2 changed files with 3 additions and 3 deletions

View File

@@ -877,9 +877,9 @@ payment_listsendpays_previous(
plugin_log(pay_plugin->plugin,LOG_DBG,
"There are pending sendpays to this invoice. "
"groupid = %ld, "
"groupid = %"PRIu64" "
"delivering = %s, "
"last_partid = %ld",
"last_partid = %"PRIu64,
last_pending_group_id,
type_to_string(tmpctx,struct amount_msat,&p->total_delivering),
last_pending_partid);

View File

@@ -51,7 +51,7 @@ static inline const char* fmt_payflow_key(
{
char *str = tal_fmt(
ctx,
"key: groupid=%ld, partid=%ld, payment_hash=%s",
"key: groupid=%"PRIu64", partid=%"PRIu64", payment_hash=%s",
k->groupid,k->partid,
type_to_string(ctx,struct sha256,k->payment_hash));
return str;