=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/find/function.c,v retrieving revision 1.31 retrieving revision 1.32 diff -c -r1.31 -r1.32 *** src/usr.bin/find/function.c 2005/06/15 14:19:45 1.31 --- src/usr.bin/find/function.c 2009/08/27 16:19:27 1.32 *************** *** 1,4 **** ! /* $OpenBSD: function.c,v 1.31 2005/06/15 14:19:45 millert Exp $ */ /*- * Copyright (c) 1990, 1993 --- 1,4 ---- ! /* $OpenBSD: function.c,v 1.32 2009/08/27 16:19:27 millert Exp $ */ /*- * Copyright (c) 1990, 1993 *************** *** 34,40 **** #ifndef lint /*static char sccsid[] = "from: @(#)function.c 8.1 (Berkeley) 6/6/93";*/ ! static char rcsid[] = "$OpenBSD: function.c,v 1.31 2005/06/15 14:19:45 millert Exp $"; #endif /* not lint */ #include --- 34,40 ---- #ifndef lint /*static char sccsid[] = "from: @(#)function.c 8.1 (Berkeley) 6/6/93";*/ ! static char rcsid[] = "$OpenBSD: function.c,v 1.32 2009/08/27 16:19:27 millert Exp $"; #endif /* not lint */ #include *************** *** 833,841 **** c_maxdepth(char *arg, char ***ignored, int unused) { PLAN *new; new = palloc(N_MAXDEPTH, f_maxdepth); ! new->max_data = atoi(arg); return (new); } --- 833,844 ---- c_maxdepth(char *arg, char ***ignored, int unused) { PLAN *new; + const char *errstr = NULL; new = palloc(N_MAXDEPTH, f_maxdepth); ! new->max_data = strtonum(arg, 1, FTS_MAXLEVEL, &errstr); ! if (errstr) ! errx(1, "%s: maxdepth value %s", arg, errstr); return (new); }