With Markus Armbruster's help I re-examined the Coverity warning we've had in this function for a while. While I still don't understand some steps in the report it's giving, I did spot some real problems in the vicinity. It turns out fixing those also fixes the Coverity warning, so here we go. Changes since v2: * Handle EINTR within write_all_buf() (suggested by Markus Armbruster) David Gibson (2): util: Add helper to write() all of a buffer util: Remove possible quadratic behaviour from write_remainder() pcap.c | 3 +-- util.c | 50 +++++++++++++++++++++++++++++++++++++++++--------- util.h | 1 + 3 files changed, 43 insertions(+), 11 deletions(-) -- 2.46.0