summaryrefslogtreecommitdiffstats
path: root/libiptc/libip4tc.c
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@medozas.de>2008-11-10 16:59:27 +0100
committerPatrick McHardy <kaber@trash.net>2008-11-10 16:59:27 +0100
commitfd1873110f8e57be578df17fc9d03536b10f4f73 (patch)
treea75c7f77ffef9cc09d32a7b1158a3cb05583d464 /libiptc/libip4tc.c
parent5a942f9501f7ce287e1c37c553eb02a1e269e081 (diff)
libiptc: remove typedef indirection
Don't you hate it when iptc_handle_t *x actually is a double-indirection struct iptc_handle **? This also shows the broken constness model, since "const iptc_handle_t x" = "iptc_handle_t const x" = "struct iptc_handle *const x", which is like no const at all. Lots of things to do then. Signed-off-by: Jan Engelhardt <jengelh@medozas.de> Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'libiptc/libip4tc.c')
-rw-r--r--libiptc/libip4tc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libiptc/libip4tc.c b/libiptc/libip4tc.c
index 71af17f6..e8aaf6aa 100644
--- a/libiptc/libip4tc.c
+++ b/libiptc/libip4tc.c
@@ -51,7 +51,7 @@ typedef unsigned int socklen_t;
#define STRUCT_REPLACE struct ipt_replace
#define STRUCT_TC_HANDLE struct iptc_handle
-#define TC_HANDLE_T iptc_handle_t
+#define xtc_handle iptc_handle
#define ENTRY_ITERATE IPT_ENTRY_ITERATE
#define TABLE_MAXNAMELEN IPT_TABLE_MAXNAMELEN
@@ -126,7 +126,7 @@ typedef unsigned int socklen_t;
#define IP_PARTS(n) IP_PARTS_NATIVE(ntohl(n))
int
-dump_entry(STRUCT_ENTRY *e, const TC_HANDLE_T handle)
+dump_entry(STRUCT_ENTRY *e, struct iptc_handle *const handle)
{
size_t i;
STRUCT_ENTRY_TARGET *t;
@@ -240,7 +240,7 @@ check_match(const STRUCT_ENTRY_MATCH *m, unsigned int *off)
static inline int
check_entry(const STRUCT_ENTRY *e, unsigned int *i, unsigned int *off,
unsigned int user_offset, int *was_return,
- TC_HANDLE_T h)
+ struct iptc_handle *h)
{
unsigned int toff;
STRUCT_STANDARD_TARGET *t;
@@ -316,7 +316,7 @@ check_entry(const STRUCT_ENTRY *e, unsigned int *i, unsigned int *off,
#ifdef IPTC_DEBUG
/* Do every conceivable sanity check on the handle */
static void
-do_check(TC_HANDLE_T h, unsigned int line)
+do_check(struct iptc_handle *h, unsigned int line)
{
unsigned int i, n;
unsigned int user_offset; /* Offset of first user chain */