summaryrefslogtreecommitdiff
path: root/gnu/usr.sbin
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2008-04-18 20:52:35 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2008-04-18 20:52:35 +0000
commitd7bf62cfe57b4fde5d0fbbcc6df4dba71476c1ef (patch)
tree6e954786f1319822140f6ec402fba075fe5c0f45 /gnu/usr.sbin
parent866fe0e24b34fcada9122736014071185d485119 (diff)
Fix return value of i_add_match() and remove some bogus APPLE_HYB
#ifdefs. Found by ragge@
Diffstat (limited to 'gnu/usr.sbin')
-rw-r--r--gnu/usr.sbin/mkhybrid/src/match.c18
-rw-r--r--gnu/usr.sbin/mkhybrid/src/match.h8
2 files changed, 6 insertions, 20 deletions
diff --git a/gnu/usr.sbin/mkhybrid/src/match.c b/gnu/usr.sbin/mkhybrid/src/match.c
index b5904c691c2..816d7c6c7b2 100644
--- a/gnu/usr.sbin/mkhybrid/src/match.c
+++ b/gnu/usr.sbin/mkhybrid/src/match.c
@@ -30,11 +30,7 @@
#define MAXMATCH 1000
static char *mat[MAXMATCH];
-#ifdef APPLE_HYB
int add_match(fn)
-#else
-void add_match(fn)
-#endif /* APPLE_HYB */
char * fn;
{
register int i;
@@ -75,11 +71,7 @@ char * fn;
static char *i_mat[MAXMATCH];
-#ifdef APPLE_HYB
int i_add_match(fn)
-#else
-void i_add_match(fn)
-#endif /* APPLE_HYB */
char * fn;
{
register int i;
@@ -87,17 +79,19 @@ char * fn;
for (i=0; i_mat[i] && i<MAXMATCH; i++);
if (i == MAXMATCH) {
fprintf(stderr,"Can't exclude RE '%s' - too many entries in table\n",fn);
- return;
+ return 1;
}
i_mat[i] = (char *) malloc(strlen(fn)+1);
if (! i_mat[i]) {
fprintf(stderr,"Can't allocate memory for excluded filename\n");
- return;
+ return 1;
}
strcpy(i_mat[i],fn);
+
+ return 0;
}
int i_matches(fn)
@@ -123,11 +117,7 @@ intptr_t i_ishidden()
static char *j_mat[MAXMATCH];
-#ifdef APPLE_HYB
int j_add_match(fn)
-#else
-void j_add_match(fn)
-#endif /* APPLE_HYB */
char * fn;
{
register int i;
diff --git a/gnu/usr.sbin/mkhybrid/src/match.h b/gnu/usr.sbin/mkhybrid/src/match.h
index 22affa0c127..bd0cb008126 100644
--- a/gnu/usr.sbin/mkhybrid/src/match.h
+++ b/gnu/usr.sbin/mkhybrid/src/match.h
@@ -5,7 +5,7 @@
*/
/*
- * $Id: match.h,v 1.4 2008/03/08 15:36:12 espie Exp $
+ * $Id: match.h,v 1.5 2008/04/18 20:52:34 millert Exp $
*/
#include <inttypes.h>
@@ -18,11 +18,11 @@ intptr_t i_ishidden __PR((void));
int j_matches __PR((char *fn));
intptr_t j_ishidden __PR((void));
-#ifdef APPLE_HYB
int add_match __PR((char *fn));
int i_add_match __PR((char *fn));
int j_add_match __PR((char *fn));
+#ifdef APPLE_HYB
int hfs_add_match __PR((char *fn));
void hfs_add_list __PR((char *fn));
int hfs_matches __PR((char *fn));
@@ -31,8 +31,4 @@ intptr_t hfs_ishidden __PR((void));
void add_list __PR((char *fn));
void i_add_list __PR((char *fn));
void j_add_list __PR((char *fn));
-#else
-void add_match __PR((char *fn));
-void i_add_match __PR((char *fn));
-void j_add_match __PR((char *fn));
#endif /* APPLE_HYB */