]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print.c
Avoiding conditional directives that break statements
[tcpdump] / print.c
diff --git a/print.c b/print.c
index ee8ee97b28d9fbe77c33f2876e7935ef1d6a689c..9fedd9fba2b0e19b054413ee021c510eb2a859b7 100644 (file)
--- a/print.c
+++ b/print.c
@@ -462,6 +462,8 @@ ndo_printf(netdissect_options *ndo _U_, const char *fmt, ...)
        ret = vfprintf(stdout, fmt, args);
        va_end(args);
 
+       if (ret < 0)
+               ndo_error(ndo, "Unable to write output: %s", pcap_strerror(errno));
        return (ret);
 }