From 0ccd55abd9284a9e4a763c23658900de44e79747 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 24 Sep 2009 01:44:34 +0200 Subject: [PATCH] ACCOUNT/userspace: remove pointless casts --- extensions/ACCOUNT/iptaccount.c | 2 +- extensions/ACCOUNT/libxt_ACCOUNT_cl.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/ACCOUNT/iptaccount.c b/extensions/ACCOUNT/iptaccount.c index e9ca803..1d9e00c 100644 --- a/extensions/ACCOUNT/iptaccount.c +++ b/extensions/ACCOUNT/iptaccount.c @@ -100,7 +100,7 @@ int main(int argc, char *argv[]) doCSV = 1; break; case 'l': - table_name = (char *)strdup(optarg); + table_name = strdup(optarg); break; case '?': default: diff --git a/extensions/ACCOUNT/libxt_ACCOUNT_cl.c b/extensions/ACCOUNT/libxt_ACCOUNT_cl.c index 9ec31b9..fb52806 100644 --- a/extensions/ACCOUNT/libxt_ACCOUNT_cl.c +++ b/extensions/ACCOUNT/libxt_ACCOUNT_cl.c @@ -34,7 +34,7 @@ int ipt_ACCOUNT_init(struct ipt_ACCOUNT_context *ctx) // 4096 bytes default buffer should save us from reallocations // as it fits 200 concurrent active clients - if ((ctx->data = (void *)malloc(IPT_ACCOUNT_MIN_BUFSIZE)) == NULL) { + if ((ctx->data = malloc(IPT_ACCOUNT_MIN_BUFSIZE)) == NULL) { close(ctx->sockfd); ctx->sockfd = -1; ctx->error_str = "Out of memory for data buffer"; @@ -104,7 +104,7 @@ int ipt_ACCOUNT_read_entries(struct ipt_ACCOUNT_context *ctx, free(ctx->data); ctx->data_size = 0; - if ((ctx->data = (void*)malloc(new_size)) == NULL) { + if ((ctx->data = malloc(new_size)) == NULL) { ctx->error_str = "Out of memory for data buffer"; ipt_ACCOUNT_free_entries(ctx); return -1;