Merge pull request #30338 from keszybz/fwrite-error-handling

Fix fwrite() error handling
This commit is contained in:
Lennart Poettering
2023-12-06 22:24:28 +01:00
committed by GitHub
6 changed files with 33 additions and 46 deletions
+2 -2
View File
@@ -147,8 +147,8 @@ int link_lldp_save(Link *link) {
goto finish;
u = htole64(sz);
(void) fwrite(&u, 1, sizeof(u), f);
(void) fwrite(p, 1, sz, f);
fwrite(&u, 1, sizeof(u), f);
fwrite(p, 1, sz, f);
}
r = fflush_and_check(f);