lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <E1HgVoE-00021H-00@gondolin.me.apana.org.au>
Date:	Wed, 25 Apr 2007 10:56:38 +1000
From:	Herbert Xu <herbert@...dor.apana.org.au>
To:	jeff@...zik.org (Jeff Garzik)
Cc:	shemminger@...ux-foundation.org, davem@...emloft.net,
	netdev@...r.kernel.org
Subject: Re: [PATCH] netdev: get rid of casts

Jeff Garzik <jeff@...zik.org> wrote:
>
>> @@ -2778,12 +2778,12 @@ int dev_ioctl(unsigned int cmd, void __user *arg)
>>  
>>       if (cmd == SIOCGIFCONF) {
>>               rtnl_lock();
>> -             ret = dev_ifconf((char __user *) arg);
>> +             ret = dev_ifconf(arg);
>>               rtnl_unlock();
>> -             return ret;
>>       }
>> +
>>       if (cmd == SIOCGIFNAME)
>> -             return dev_ifname((struct ifreq __user *)arg);
>> +             return dev_ifname(arg);
> 
> Seems like a net loss of information, with your patch.
> 
> The casts are adding missing type information, in this case.  Certainly 
> it is more for human consumption than compiler consumption, but 
> nonetheless...

How about just getting rid of the casts? 'arg' is already void * to
begin with.
 
Cheers,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ