mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-08 13:44:56 +02:00
ACCOUNT/userspace: remove pointless casts
This commit is contained in:
@@ -100,7 +100,7 @@ int main(int argc, char *argv[])
|
|||||||
doCSV = 1;
|
doCSV = 1;
|
||||||
break;
|
break;
|
||||||
case 'l':
|
case 'l':
|
||||||
table_name = (char *)strdup(optarg);
|
table_name = strdup(optarg);
|
||||||
break;
|
break;
|
||||||
case '?':
|
case '?':
|
||||||
default:
|
default:
|
||||||
|
@@ -34,7 +34,7 @@ int ipt_ACCOUNT_init(struct ipt_ACCOUNT_context *ctx)
|
|||||||
|
|
||||||
// 4096 bytes default buffer should save us from reallocations
|
// 4096 bytes default buffer should save us from reallocations
|
||||||
// as it fits 200 concurrent active clients
|
// 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);
|
close(ctx->sockfd);
|
||||||
ctx->sockfd = -1;
|
ctx->sockfd = -1;
|
||||||
ctx->error_str = "Out of memory for data buffer";
|
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);
|
free(ctx->data);
|
||||||
ctx->data_size = 0;
|
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";
|
ctx->error_str = "Out of memory for data buffer";
|
||||||
ipt_ACCOUNT_free_entries(ctx);
|
ipt_ACCOUNT_free_entries(ctx);
|
||||||
return -1;
|
return -1;
|
||||||
|
Reference in New Issue
Block a user