diff options
Diffstat (limited to 'src/libsystemd/sd-bus/bus-dump.c')
-rw-r--r-- | src/libsystemd/sd-bus/bus-dump.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/libsystemd/sd-bus/bus-dump.c b/src/libsystemd/sd-bus/bus-dump.c index 9db86adb7f..a6b05eb88d 100644 --- a/src/libsystemd/sd-bus/bus-dump.c +++ b/src/libsystemd/sd-bus/bus-dump.c @@ -551,9 +551,8 @@ int bus_pcap_header(size_t snaplen, FILE *f) { hdr.snaplen = (uint32_t) snaplen; fwrite(&hdr, 1, sizeof(hdr), f); - fflush(f); - return 0; + return fflush_and_check(f); } int bus_message_pcap_frame(sd_bus_message *m, size_t snaplen, FILE *f) { @@ -598,7 +597,5 @@ int bus_message_pcap_frame(sd_bus_message *m, size_t snaplen, FILE *f) { snaplen -= w; } - fflush(f); - - return 0; + return fflush_and_check(f); } |