summaryrefslogtreecommitdiff
path: root/mktag.c
diff options
context:
space:
mode:
Diffstat (limited to 'mktag.c')
-rw-r--r--mktag.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/mktag.c b/mktag.c
index 97e270a..fc6a9bf 100644
--- a/mktag.c
+++ b/mktag.c
@@ -116,14 +116,9 @@ int main(int argc, char **argv)
// Read the signature
size = 0;
for (;;) {
- int ret = read(0, buffer + size, MAXSIZE - size);
- if (!ret)
+ int ret = xread(0, buffer + size, MAXSIZE - size);
+ if (ret <= 0)
break;
- if (ret < 0) {
- if (errno == EAGAIN)
- continue;
- break;
- }
size += ret;
}