From: Andre Noll Date: Tue, 6 Oct 2015 01:54:02 +0000 (+0000) Subject: Make FOR_EACH_SUPPORTED_FILTER() local to filter_common.c. X-Git-Tag: v0.5.6~67 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=7eab3b26d6c5094ad13bf64ac07eaed57f7b69a0;hp=36c7f87c8089baf36726c22c6a3b78865c1e7d3d Make FOR_EACH_SUPPORTED_FILTER() local to filter_common.c. The macro is only used in this .c file, so it should not be public. This patch moves the macro from filter.h to filter_common.c. --- diff --git a/filter.h b/filter.h index 7ae28fe4..ab312f5d 100644 --- a/filter.h +++ b/filter.h @@ -140,8 +140,5 @@ static inline void write_int16_host_endian(char *buf, int val) DECLARE_FILTER_INITS -/** Iterate over the array of supported filters. */ -#define FOR_EACH_SUPPORTED_FILTER(j) for (j = 0; j < NUM_SUPPORTED_FILTERS; j++) - /** The filter array, one structure for each supported filter. */ extern struct filter filters[NUM_SUPPORTED_FILTERS]; diff --git a/filter_common.c b/filter_common.c index 009ac936..53cde746 100644 --- a/filter_common.c +++ b/filter_common.c @@ -19,6 +19,9 @@ #include "error.h" #include "string.h" +/** Iterate over the array of supported filters. */ +#define FOR_EACH_SUPPORTED_FILTER(j) for (j = 0; j < NUM_SUPPORTED_FILTERS; j++) + /** The array of supported filters. */ struct filter filters[NUM_SUPPORTED_FILTERS] = {FILTER_ARRAY};