sd-json: accept NULL path in sd_json_parse_file_at() too, port one manual fdopen() to it (#39538)

This commit is contained in:
Yu Watanabe
2025-11-05 01:40:27 +09:00
committed by GitHub
3 changed files with 7 additions and 17 deletions
+1 -3
View File
@@ -3453,10 +3453,8 @@ _public_ int sd_json_parse_file_at(
if (f)
r = read_full_stream(f, &text, NULL);
else if (path)
r = read_full_file_full(dir_fd, path, UINT64_MAX, SIZE_MAX, 0, NULL, &text, NULL);
else
return -EINVAL;
r = read_full_file_full(dir_fd, path, UINT64_MAX, SIZE_MAX, 0, NULL, &text, NULL);
if (r < 0)
return r;