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
6
dlight.c
6
dlight.c
|
|
@ -3,14 +3,13 @@
|
|||
#include <string.h>
|
||||
#include <errno.h>
|
||||
#include "env.h"
|
||||
#include "error.h"
|
||||
#include "cconf.h"
|
||||
#include "dlhist.h"
|
||||
#include "filter.h"
|
||||
#include "http.h"
|
||||
#include "rss.h"
|
||||
|
||||
#define error(...) fprintf(stderr, "error: " __VA_ARGS__)
|
||||
|
||||
static void process_items(rss_t rss, struct target *t) {
|
||||
|
||||
int i;
|
||||
|
|
@ -29,8 +28,7 @@ static void process_items(rss_t rss, struct target *t) {
|
|||
|
||||
if (http_download_file(item.link, filter->dest) < 0 &&
|
||||
errno != EEXIST) {
|
||||
printf("download failed: %s\n",
|
||||
strerror(errno));
|
||||
error("download failed: %s\n", strerror(errno));
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
Reference in a new issue