From 617b81802179b49109fbe220ba6c3eb4ceb71a52 Mon Sep 17 00:00:00 2001 From: Josef Karthauser Date: Wed, 10 Jan 2001 13:27:38 +0000 Subject: [PATCH] Flag an error and remove the program from the list if there is no source directory or no objects can be determined. Initialise a structure variable. --- usr.sbin/crunch/crunchgen/crunchgen.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/usr.sbin/crunch/crunchgen/crunchgen.c b/usr.sbin/crunch/crunchgen/crunchgen.c index d1e5e0243190..2d3974a38b95 100644 --- a/usr.sbin/crunch/crunchgen/crunchgen.c +++ b/usr.sbin/crunch/crunchgen/crunchgen.c @@ -345,7 +345,7 @@ void add_prog(char *progname) if(p1 == NULL) progs = p2; else p1->next = p2; - p2->ident = p2->srcdir = p2->objdir = NULL; + p2->ident = p2->srcdir = p2->realsrcdir = p2->objdir = NULL; p2->links = p2->objs = p2->keeplist = NULL; p2->buildopts = NULL; p2->goterror = 0; @@ -578,6 +578,9 @@ void fillin_program(prog_t *p) if(!p->objs && verbose) warnx("%s: %s: warning: could not find any .o files", infilename, p->name); + + if(!p->srcdir || !p->objs) + p->goterror = 1; } void fillin_program_objs(prog_t *p, char *path)