summaryrefslogtreecommitdiff
path: root/usr.bin/find/main.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2001-07-12 05:17:34 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2001-07-12 05:17:34 +0000
commit937c9a0f84db15a0a64ed0419a42da3a34d96cde (patch)
treeb6b3bfb6f6bbc506426154fc8294316054abb45f /usr.bin/find/main.c
parent4e5dd980fd1238d635621b9bba7d99533aababd6 (diff)
first pass at a -Wall cleanup
Diffstat (limited to 'usr.bin/find/main.c')
-rw-r--r--usr.bin/find/main.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/usr.bin/find/main.c b/usr.bin/find/main.c
index c03a38b08eb..769a074f7ef 100644
--- a/usr.bin/find/main.c
+++ b/usr.bin/find/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.8 1999/03/17 17:36:30 espie Exp $ */
+/* $OpenBSD: main.c,v 1.9 2001/07/12 05:17:04 deraadt Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -35,7 +35,7 @@
#ifndef lint
/*static char sccsid[] = "@(#)main.c 8.1 (Berkeley) 6/6/93";*/
-static char rcsid[] = "$OpenBSD: main.c,v 1.8 1999/03/17 17:36:30 espie Exp $";
+static char rcsid[] = "$OpenBSD: main.c,v 1.9 2001/07/12 05:17:04 deraadt Exp $";
#endif /* not lint */
#include <sys/types.h>
@@ -48,6 +48,7 @@ static char rcsid[] = "$OpenBSD: main.c,v 1.8 1999/03/17 17:36:30 espie Exp $";
#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <time.h>
#include "find.h"
@@ -67,10 +68,14 @@ main(argc, argv)
int argc;
char *argv[];
{
- struct sigaction sa = { show_path, SA_RESTART, NULL };
+ struct sigaction sa;
char **p, **paths;
int ch;
+ memset(&sa, 0, sizeof sa);
+ sa.sa_handler = show_path;
+ sa.sa_flags = SA_RESTART;
+
(void)time(&now); /* initialize the time-of-day */
p = paths = (char **) emalloc(sizeof(char *) * argc);