@@ -129,13 +129,13 @@ static bool success_data_from_listsendpays(const char *buf,
129129 plugin_err (
130130 pay_plugin -> plugin ,
131131 "%s (line %d) missing status token from json." ,
132- __PRETTY_FUNCTION__ , __LINE__ );
132+ __func__ , __LINE__ );
133133 const char * status = json_strdup (tmpctx , buf , status_tok );
134134 if (!status )
135135 plugin_err (
136136 pay_plugin -> plugin ,
137137 "%s (line %d) failed to allocate status string." ,
138- __PRETTY_FUNCTION__ , __LINE__ );
138+ __func__ , __LINE__ );
139139
140140 if (streq (status , "complete" )) {
141141 /* FIXME we assume amount_msat is always present, but
@@ -160,7 +160,7 @@ static bool success_data_from_listsendpays(const char *buf,
160160 "%s (line %d) json_scan of "
161161 "listsendpay returns the "
162162 "following error: %s" ,
163- __PRETTY_FUNCTION__ , __LINE__ , err );
163+ __func__ , __LINE__ , err );
164164 success -> groupid = groupid ;
165165 /* Now we know the payment completed. */
166166 if (!amount_msat_add (& success -> deliver_msat ,
@@ -170,7 +170,7 @@ static bool success_data_from_listsendpays(const char *buf,
170170 success -> sent_msat , this_sent ))
171171 plugin_err (pay_plugin -> plugin ,
172172 "%s (line %d) amount_msat overflow." ,
173- __PRETTY_FUNCTION__ , __LINE__ );
173+ __func__ , __LINE__ );
174174
175175 success -> parts ++ ;
176176 }
@@ -482,7 +482,7 @@ static struct command_result *refreshgossmap_cb(struct payment *payment)
482482 pay_plugin -> plugin , LOG_UNUSUAL ,
483483 "%s: uncertainty was updated but %d channels have "
484484 "been ignored." ,
485- __PRETTY_FUNCTION__ , skipped_count );
485+ __func__ , skipped_count );
486486 }
487487 return payment_continue (payment );
488488}
@@ -597,7 +597,7 @@ static struct command_result *routehints_done(struct command *cmd UNUSED,
597597 plugin_log (pay_plugin -> plugin , LOG_UNUSUAL ,
598598 "%s: uncertainty was updated but %d channels have "
599599 "been ignored." ,
600- __PRETTY_FUNCTION__ , skipped_count );
600+ __func__ , skipped_count );
601601
602602 return payment_continue (payment );
603603}
@@ -631,22 +631,22 @@ static struct command_result *compute_routes_cb(struct payment *payment)
631631 tal_count (routetracker -> computed_routes ))
632632 plugin_err (pay_plugin -> plugin ,
633633 "%s: no previously computed routes expected." ,
634- __PRETTY_FUNCTION__ );
634+ __func__ );
635635
636636 struct amount_msat feebudget , fees_spent , remaining ;
637637
638638 /* Total feebudget */
639639 if (!amount_msat_sub (& feebudget , payment -> payment_info .maxspend ,
640640 payment -> payment_info .amount ))
641641 plugin_err (pay_plugin -> plugin , "%s: fee budget is negative?" ,
642- __PRETTY_FUNCTION__ );
642+ __func__ );
643643
644644 /* Fees spent so far */
645645 if (!amount_msat_sub (& fees_spent , payment -> total_sent ,
646646 payment -> total_delivering ))
647647 plugin_err (pay_plugin -> plugin ,
648648 "%s: total_delivering is greater than total_sent?" ,
649- __PRETTY_FUNCTION__ );
649+ __func__ );
650650
651651 /* Remaining fee budget. */
652652 if (!amount_msat_sub (& feebudget , feebudget , fees_spent ))
@@ -658,7 +658,7 @@ static struct command_result *compute_routes_cb(struct payment *payment)
658658 plugin_log (pay_plugin -> plugin , LOG_UNUSUAL ,
659659 "%s: Payment is pending with full amount already "
660660 "committed. We skip the computation of new routes." ,
661- __PRETTY_FUNCTION__ );
661+ __func__ );
662662 return payment_continue (payment );
663663 }
664664
@@ -724,7 +724,7 @@ static struct command_result *send_routes_cb(struct payment *payment)
724724 tal_count (routetracker -> computed_routes ) == 0 ) {
725725 plugin_log (pay_plugin -> plugin , LOG_UNUSUAL ,
726726 "%s: there are no routes to send, skipping." ,
727- __PRETTY_FUNCTION__ );
727+ __func__ );
728728 return payment_continue (payment );
729729 }
730730 struct command * cmd = payment_command (payment );
@@ -806,7 +806,7 @@ static struct command_result *collect_results_cb(struct payment *payment)
806806 "%s: received a success sendpay for this "
807807 "payment but the total delivering amount %s "
808808 "is less than the payment amount %s." ,
809- __PRETTY_FUNCTION__ ,
809+ __func__ ,
810810 fmt_amount_msat (tmpctx , payment -> total_delivering ),
811811 fmt_amount_msat (tmpctx ,
812812 payment -> payment_info .amount ));
@@ -930,7 +930,7 @@ static struct command_result *pendingsendpays_done(struct command *cmd,
930930 payment_note (payment , LOG_DBG ,
931931 "%s: Payment completed before computing the next "
932932 "round of routes." ,
933- __PRETTY_FUNCTION__ );
933+ __func__ );
934934 return payment_success (payment , & success .preimage );
935935 }
936936
@@ -950,7 +950,7 @@ static struct command_result *pendingsendpays_done(struct command *cmd,
950950 plugin_err (pay_plugin -> plugin ,
951951 "%s json_scan of listsendpay returns the "
952952 "following error: %s" ,
953- __PRETTY_FUNCTION__ , err );
953+ __func__ , err );
954954
955955 if (streq (status , "pending" )) {
956956 pending_group_id = groupid ;
@@ -985,7 +985,7 @@ static struct command_result *pendingsendpays_done(struct command *cmd,
985985 plugin_err (pay_plugin -> plugin ,
986986 "%s json_scan of listsendpay returns the "
987987 "following error: %s" ,
988- __PRETTY_FUNCTION__ , err );
988+ __func__ , err );
989989
990990 /* If we decide to create a new group, we base it on
991991 * max_group_id */
@@ -1011,7 +1011,7 @@ static struct command_result *pendingsendpays_done(struct command *cmd,
10111011 this_sent ))
10121012 plugin_err (pay_plugin -> plugin ,
10131013 "%s (line %d) amount_msat overflow." ,
1014- __PRETTY_FUNCTION__ , __LINE__ );
1014+ __func__ , __LINE__ );
10151015 }
10161016 assert (!streq (status , "complete" ));
10171017 }
0 commit comments