diff options
| author | lukem <lukem@NetBSD.org> | 1999-11-08 21:58:00 +0000 |
|---|---|---|
| committer | lukem <lukem@NetBSD.org> | 1999-11-08 21:58:00 +0000 |
| commit | fea5b77bc6f73efdaccc4e4c346006c833317ad2 (patch) | |
| tree | d77c29a0ccc8e8b62bcd2af358d62fb8a0c5cf9d /gnu/usr.bin | |
| parent | 1b686307cb2833aaaf07c3adc70aa2d0dac57d44 (diff) | |
don't bother calling fwrite() if count == 0' ld.c
Diffstat (limited to 'gnu/usr.bin')
| -rw-r--r-- | gnu/usr.bin/ld/ld/ld.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gnu/usr.bin/ld/ld/ld.c b/gnu/usr.bin/ld/ld/ld.c index 72f4f4bd4e7..29fbaf84ea8 100644 --- a/gnu/usr.bin/ld/ld/ld.c +++ b/gnu/usr.bin/ld/ld/ld.c @@ -1,4 +1,4 @@ -/* $NetBSD: ld.c,v 1.65 1999/06/25 12:10:42 pk Exp $ */ +/* $NetBSD: ld.c,v 1.66 1999/11/08 21:58:00 lukem Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. * All rights reserved. @@ -88,7 +88,7 @@ #ifndef lint /* from: "@(#)ld.c 6.10 (Berkeley) 5/22/91"; */ -__RCSID("$NetBSD: ld.c,v 1.65 1999/06/25 12:10:42 pk Exp $"); +__RCSID("$NetBSD: ld.c,v 1.66 1999/11/08 21:58:00 lukem Exp $"); #endif /* not lint */ #define GNU_BINUTIL_COMPAT /* forwards compatiblity with binutils 2.x */ @@ -4049,6 +4049,8 @@ mywrite(buf, count, eltsize, fd) FILE *fd; { + if (count == 0) + return; if (fwrite(buf, eltsize, count, fd) != count) err(1, "write"); } |
