| 1778 | } |
| 1779 | |
| 1780 | static int jl_write_atomic(const char *requested_path, const char *content, size_t length, |
| 1781 | const char *expected_content, size_t expected_length, |
| 1782 | const jl_file_snapshot_t *expected_snapshot) { |
| 1783 | cbm_config_edit_target_t target; |
| 1784 | if (cbm_config_edit_target_open(requested_path, &target) < 0) { |
| 1785 | return -1; |
| 1786 | } |
| 1787 | int result = jl_write_atomic_at(&target, content, length, expected_content, expected_length, |
| 1788 | expected_snapshot); |
| 1789 | cbm_config_edit_target_close(&target); |
| 1790 | return result; |
| 1791 | } |
| 1792 | |
| 1793 | static int jl_decode_utf8(const unsigned char *text, size_t remaining, uint32_t *codepoint, |
| 1794 | size_t *byte_count) { |
no test coverage detected