* [PATCH 1/1 net-next] dev_ioctl: use sizeof(x) instead of sizeof x
@ 2014-11-17 21:23 Fabian Frederick
2014-11-18 20:55 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Fabian Frederick @ 2014-11-17 21:23 UTC (permalink / raw)
To: linux-kernel; +Cc: Fabian Frederick, David S. Miller, netdev
Also remove spaces after cast.
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
net/core/dev_ioctl.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/net/core/dev_ioctl.c b/net/core/dev_ioctl.c
index 72e899a..b94b1d2 100644
--- a/net/core/dev_ioctl.c
+++ b/net/core/dev_ioctl.c
@@ -142,10 +142,12 @@ static int dev_ifsioc_locked(struct net *net, struct ifreq *ifr, unsigned int cm
case SIOCGIFHWADDR:
if (!dev->addr_len)
- memset(ifr->ifr_hwaddr.sa_data, 0, sizeof ifr->ifr_hwaddr.sa_data);
+ memset(ifr->ifr_hwaddr.sa_data, 0,
+ sizeof(ifr->ifr_hwaddr.sa_data));
else
memcpy(ifr->ifr_hwaddr.sa_data, dev->dev_addr,
- min(sizeof ifr->ifr_hwaddr.sa_data, (size_t) dev->addr_len));
+ min(sizeof(ifr->ifr_hwaddr.sa_data),
+ (size_t)dev->addr_len));
ifr->ifr_hwaddr.sa_family = dev->type;
return 0;
@@ -265,7 +267,8 @@ static int dev_ifsioc(struct net *net, struct ifreq *ifr, unsigned int cmd)
if (ifr->ifr_hwaddr.sa_family != dev->type)
return -EINVAL;
memcpy(dev->broadcast, ifr->ifr_hwaddr.sa_data,
- min(sizeof ifr->ifr_hwaddr.sa_data, (size_t) dev->addr_len));
+ min(sizeof(ifr->ifr_hwaddr.sa_data),
+ (size_t)dev->addr_len));
call_netdevice_notifiers(NETDEV_CHANGEADDR, dev);
return 0;
--
1.9.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1 net-next] dev_ioctl: use sizeof(x) instead of sizeof x
2014-11-17 21:23 [PATCH 1/1 net-next] dev_ioctl: use sizeof(x) instead of sizeof x Fabian Frederick
@ 2014-11-18 20:55 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-11-18 20:55 UTC (permalink / raw)
To: fabf; +Cc: linux-kernel, netdev
From: Fabian Frederick <fabf@skynet.be>
Date: Mon, 17 Nov 2014 22:23:17 +0100
> Also remove spaces after cast.
>
> Signed-off-by: Fabian Frederick <fabf@skynet.be>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-11-18 20:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-17 21:23 [PATCH 1/1 net-next] dev_ioctl: use sizeof(x) instead of sizeof x Fabian Frederick
2014-11-18 20:55 ` David Miller
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).