=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/find/main.c,v retrieving revision 1.5 retrieving revision 1.6 diff -c -r1.5 -r1.6 *** src/usr.bin/find/main.c 1997/06/17 05:26:17 1.5 --- src/usr.bin/find/main.c 1997/06/17 05:35:44 1.6 *************** *** 1,4 **** ! /* $OpenBSD: main.c,v 1.5 1997/06/17 05:26:17 millert Exp $ */ /*- * Copyright (c) 1990, 1993 --- 1,4 ---- ! /* $OpenBSD: main.c,v 1.6 1997/06/17 05:35:44 millert Exp $ */ /*- * Copyright (c) 1990, 1993 *************** *** 35,41 **** #ifndef lint /*static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93";*/ ! static char rcsid[] = "$OpenBSD: main.c,v 1.5 1997/06/17 05:26:17 millert Exp $"; #endif /* not lint */ #include --- 35,41 ---- #ifndef lint /*static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93";*/ ! static char rcsid[] = "$OpenBSD: main.c,v 1.6 1997/06/17 05:35:44 millert Exp $"; #endif /* not lint */ #include *************** *** 73,79 **** (void)time(&now); /* initialize the time-of-day */ ! p = paths = (char **) emalloc(sizeof(char *) * argc); sigaction(SIGINFO, &sa, NULL); --- 73,79 ---- (void)time(&now); /* initialize the time-of-day */ ! p = paths = (char **) emalloc(sizeof(char *) * (argc > 1 ? argc : 2)); sigaction(SIGINFO, &sa, NULL); *************** *** 119,127 **** *p++ = *argv++; } *p = NULL; ! if (paths[0] == NULL) /* we must have at least one path */ ! usage(); if (!(paths = realloc(paths, sizeof(char *) * (p - paths + 1)))) err(1, NULL); --- 119,128 ---- *p++ = *argv++; } + if (p == paths) + *p++ = "."; /* use cwd if no dir specified */ *p = NULL; ! if (!(paths = realloc(paths, sizeof(char *) * (p - paths + 1)))) err(1, NULL);