diff --git a/gnu/usr.bin/ld/ld.c b/gnu/usr.bin/ld/ld.c index 20bb15212ff..8fafef18584 100644 --- a/gnu/usr.bin/ld/ld.c +++ b/gnu/usr.bin/ld/ld.c @@ -32,7 +32,7 @@ static char sccsid[] = "@(#)ld.c 6.10 (Berkeley) 5/22/91"; Set, indirect, and warning symbol features added by Randy Smith. */ /* - * $Id: ld.c,v 1.28 1995/06/14 06:25:09 joerg Exp $ + * $Id: ld.c,v 1.29 1995/07/13 08:30:07 rgrimes Exp $ */ /* Define how to initialize system-dependent header fields. */ @@ -959,7 +959,7 @@ file_open(entry) } else fd = open(entry->filename, O_RDONLY, 0); - if (fd > 0) { + if (fd >= 0) { input_file = entry; input_desc = fd; return fd; @@ -2475,7 +2475,7 @@ write_output() outstream = fopen(output_filename, "w"); if (outstream == NULL) - err(1, "open: %s", output_filename); + err(1, "fopen: %s", output_filename); if (atexit(cleanup)) err(1, "atexit"); diff --git a/gnu/usr.bin/ld/lib.c b/gnu/usr.bin/ld/lib.c index 78d692610f1..5e119ba0436 100644 --- a/gnu/usr.bin/ld/lib.c +++ b/gnu/usr.bin/ld/lib.c @@ -1,5 +1,5 @@ /* - * $Id: lib.c,v 1.14 1995/04/07 05:08:28 nate Exp $ - library routines + * $Id: lib.c,v 1.15 1995/05/30 05:01:46 rgrimes Exp $ - library routines */ #include @@ -830,7 +830,7 @@ struct file_entry *p; fname = findshlib(p->filename, &major, &minor, 1); - if (fname && (fd = open(fname, O_RDONLY, 0)) > 0) { + if (fname && (fd = open(fname, O_RDONLY, 0)) >= 0) { p->filename = fname; p->lib_major = major; p->lib_minor = minor; @@ -852,7 +852,7 @@ dot_a: register char *path = concat(search_dirs[i], "/", fname); fd = open(path, O_RDONLY, 0); - if (fd > 0) { + if (fd >= 0) { p->filename = path; p->flags &= ~E_SEARCH_DIRS; break;