* ipt_ACCOUNT 1.11 warning fix
@ 2007-09-27 9:45 Jan Engelhardt
2007-09-27 12:16 ` Thomas Jarosch
0 siblings, 1 reply; 2+ messages in thread
From: Jan Engelhardt @ 2007-09-27 9:45 UTC (permalink / raw)
To: opensource; +Cc: Netfilter Developer Mailing List
sizeof() produces a 'size_t', which is a little bit larger than %u on
64-bit. Fix it, the right way using %zu.
---
net/ipv4/netfilter/ipt_ACCOUNT.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
Index: linux-2.6.22/net/ipv4/netfilter/ipt_ACCOUNT.c
===================================================================
--- linux-2.6.22.orig/net/ipv4/netfilter/ipt_ACCOUNT.c
+++ linux-2.6.22/net/ipv4/netfilter/ipt_ACCOUNT.c
@@ -867,7 +867,7 @@ static int ipt_acc_set_ctl(struct sock *
switch (cmd) {
case IPT_SO_SET_ACCOUNT_HANDLE_FREE:
if (len != sizeof(struct ipt_acc_handle_sockopt)) {
- printk("ACCOUNT: ipt_acc_set_ctl: wrong data size (%u != %u) "
+ printk("ACCOUNT: ipt_acc_set_ctl: wrong data size (%u != %zu) "
"for IPT_SO_SET_HANDLE_FREE\n",
len, sizeof(struct ipt_acc_handle_sockopt));
break;
@@ -913,7 +913,7 @@ static int ipt_acc_get_ctl(struct sock *
struct ipt_acc_handle dest;
if (*len < sizeof(struct ipt_acc_handle_sockopt)) {
- printk("ACCOUNT: ipt_acc_get_ctl: wrong data size (%u != %u) "
+ printk("ACCOUNT: ipt_acc_get_ctl: wrong data size (%u != %zu) "
"for IPT_SO_GET_ACCOUNT_PREPARE_READ/READ_FLUSH\n",
*len, sizeof(struct ipt_acc_handle_sockopt));
break;
@@ -958,7 +958,7 @@ static int ipt_acc_get_ctl(struct sock *
}
case IPT_SO_GET_ACCOUNT_GET_DATA:
if (*len < sizeof(struct ipt_acc_handle_sockopt)) {
- printk("ACCOUNT: ipt_acc_get_ctl: wrong data size (%u != %u)"
+ printk("ACCOUNT: ipt_acc_get_ctl: wrong data size (%u != %zu)"
" for IPT_SO_GET_ACCOUNT_PREPARE_READ/READ_FLUSH\n",
*len, sizeof(struct ipt_acc_handle_sockopt));
break;
@@ -977,7 +977,7 @@ static int ipt_acc_get_ctl(struct sock *
if (*len < ipt_acc_handles[handle.handle_nr].itemcount
* sizeof(struct ipt_acc_handle_ip)) {
- printk("ACCOUNT: ipt_acc_get_ctl: not enough space (%u < %u)"
+ printk("ACCOUNT: ipt_acc_get_ctl: not enough space (%u < %zu)"
" to store data from IPT_SO_GET_ACCOUNT_GET_DATA\n",
*len, ipt_acc_handles[handle.handle_nr].itemcount
* sizeof(struct ipt_acc_handle_ip));
@@ -999,7 +999,7 @@ static int ipt_acc_get_ctl(struct sock *
case IPT_SO_GET_ACCOUNT_GET_HANDLE_USAGE: {
unsigned int i;
if (*len < sizeof(struct ipt_acc_handle_sockopt)) {
- printk("ACCOUNT: ipt_acc_get_ctl: wrong data size (%u != %u)"
+ printk("ACCOUNT: ipt_acc_get_ctl: wrong data size (%u != %zu)"
" for IPT_SO_GET_ACCOUNT_GET_HANDLE_USAGE\n",
*len, sizeof(struct ipt_acc_handle_sockopt));
break;
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-09-27 12:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-27 9:45 ipt_ACCOUNT 1.11 warning fix Jan Engelhardt
2007-09-27 12:16 ` Thomas Jarosch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).