From 99d07c6e204bd025a00bf283e0107622a665742b Mon Sep 17 00:00:00 2001 From: marc Date: Fri, 17 Oct 1997 18:12:09 +0000 Subject: [PATCH] Check for write errors CVS patchset: 1865 CVS date: 1997/10/17 18:12:09 --- lib/rpmlead.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/rpmlead.c b/lib/rpmlead.c index af6a131..e675ded 100644 --- a/lib/rpmlead.c +++ b/lib/rpmlead.c @@ -32,7 +32,9 @@ int writeLead(int fd, struct rpmlead *lead) l.osnum = htons(l.osnum); l.signature_type = htons(l.signature_type); - write(fd, &l, sizeof(l)); + if (write(fd, &l, sizeof(l)) < 0) { + return 1; + } return 0; } -- 2.7.4