This reuses str if we're to take it. */
| 460 | |
| 461 | /* This reuses str if we're to take it. */ |
| 462 | static char *fixed_string(const tal_t *ctx, |
| 463 | const char *str, const char *path) |
| 464 | { |
| 465 | char *ret = tal_dup_arr(ctx, char, path, 0, strlen(str)+1); |
| 466 | if (ret) |
| 467 | strcpy(ret, str); |
| 468 | return ret; |
| 469 | } |
| 470 | |
| 471 | char *path_dirname(const tal_t *ctx, const char *path) |
| 472 | { |