This reuses str if we're to take it. */
| 483 | |
| 484 | /* This reuses str if we're to take it. */ |
| 485 | static char *fixed_string(const tal_t *ctx, |
| 486 | const char *str, const char *path) |
| 487 | { |
| 488 | char *ret = tal_dup_arr(ctx, char, path, 0, strlen(str)+1); |
| 489 | if (ret) |
| 490 | strcpy(ret, str); |
| 491 | return ret; |
| 492 | } |
| 493 | |
| 494 | char *path_dirname(const tal_t *ctx, const char *path) |
| 495 | { |