Make the other modules use error.c
This commit is contained in:
parent
6bc3ffde5d
commit
a2f2e58353
7 changed files with 26 additions and 32 deletions
|
|
@ -27,12 +27,11 @@
|
|||
#include <errno.h>
|
||||
#include <ctype.h>
|
||||
#include "env.h"
|
||||
#include "error.h"
|
||||
#include "cconf.h"
|
||||
#include "lockfile.h"
|
||||
#include "filter.h"
|
||||
|
||||
#define error(...) fprintf(stderr, "error: " __VA_ARGS__)
|
||||
|
||||
#define isalias(x) (isalnum(x) || (x) == '-')
|
||||
|
||||
#define MAXNAME 1024
|
||||
|
|
@ -252,8 +251,7 @@ static int parse_target(struct target *target) {
|
|||
if (!alias)
|
||||
return -1;
|
||||
if (!alias[0] && !dest_table_nr) {
|
||||
error("No destination found for target '%s'\n", src);
|
||||
return -1;
|
||||
return error("No destination found for target '%s'\n", src);
|
||||
}
|
||||
|
||||
target->src = strdup(src);
|
||||
|
|
|
|||
Reference in a new issue