ACCOUNT/userspace: remove pointless casts

This commit is contained in:
Jan Engelhardt
2009-09-24 01:44:34 +02:00
parent 60123a8c07
commit 0ccd55abd9
2 changed files with 3 additions and 3 deletions

View File

@@ -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:

View File

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