=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/elf2olf/Attic/elf2olf.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- src/usr.bin/elf2olf/Attic/elf2olf.c 2003/06/10 22:20:46 1.7 +++ src/usr.bin/elf2olf/Attic/elf2olf.c 2006/03/22 13:25:58 1.8 @@ -1,4 +1,4 @@ -/* $OpenBSD: elf2olf.c,v 1.7 2003/06/10 22:20:46 deraadt Exp $ */ +/* $OpenBSD: elf2olf.c,v 1.8 2006/03/22 13:25:58 ray Exp $ */ /* * Copyright (c) 1996 Erik Theisen. All rights reserved. * @@ -30,7 +30,7 @@ #endif /* not lint */ #ifndef lint -static char rcsid[] = "@(#) $Id: elf2olf.c,v 1.7 2003/06/10 22:20:46 deraadt Exp $"; +static char rcsid[] = "@(#) $Id: elf2olf.c,v 1.8 2006/03/22 13:25:58 ray Exp $"; #endif #include @@ -122,7 +122,7 @@ do { okay = 0; - if ((fd = open(*argv, O_RDWR | O_EXLOCK, 0)) > 0 && + if ((fd = open(*argv, O_RDWR | O_EXLOCK, 0)) != -1 && lseek(fd, (off_t)0, SEEK_SET) == 0 && fstat(fd, &st) == 0) {