=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/find/function.c,v retrieving revision 1.15 retrieving revision 1.16 diff -c -r1.15 -r1.16 *** src/usr.bin/find/function.c 1999/10/04 21:17:32 1.15 --- src/usr.bin/find/function.c 1999/10/04 21:26:10 1.16 *************** *** 1,4 **** ! /* $OpenBSD: function.c,v 1.15 1999/10/04 21:17:32 millert Exp $ */ /*- * Copyright (c) 1990, 1993 --- 1,4 ---- ! /* $OpenBSD: function.c,v 1.16 1999/10/04 21:26:10 millert Exp $ */ /*- * Copyright (c) 1990, 1993 *************** *** 38,44 **** #ifndef lint /*static char sccsid[] = "from: @(#)function.c 8.1 (Berkeley) 6/6/93";*/ ! static char rcsid[] = "$OpenBSD: function.c,v 1.15 1999/10/04 21:17:32 millert Exp $"; #endif /* not lint */ #include --- 38,44 ---- #ifndef lint /*static char sccsid[] = "from: @(#)function.c 8.1 (Berkeley) 6/6/93";*/ ! static char rcsid[] = "$OpenBSD: function.c,v 1.16 1999/10/04 21:26:10 millert Exp $"; #endif /* not lint */ #include *************** *** 453,459 **** return (0); } if (chdir(entry->fts_accpath)) { ! warn("cannot chdir to %s", entry->fts_accpath); return (0); } } --- 453,459 ---- return (0); } if (chdir(entry->fts_accpath)) { ! (void) close(fd); return (0); } } *************** *** 484,491 **** --- 484,493 ---- if (entry->fts_level == FTS_ROOTLEVEL) { if (fchdir(fd) == -1) { warn("unable to chdir back to starting directory"); + (void) close(fd); return (0); } + (void) close(fd); } pid = waitpid(pid, &status, 0);