Archived
1
0
Fork 0

Make the other modules use error.c

This commit is contained in:
Henrik Hautakoski 2011-08-04 11:10:08 +02:00
parent 6bc3ffde5d
commit a2f2e58353
7 changed files with 26 additions and 32 deletions

View file

@ -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;
}