Skip to contentSkip to conversation

net: make in_aton() 32-bit internally

PATCH Applied Alexey Dobriyan 2 participants 2 messages Mar 23, 2017 – Mar 24, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: make in_aton() 32-bit internally

Converting IPv4 address doesn't need 64-bit arithmetic.

Space savings: 10 bytes!

add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-10 (-10)
function old new delta
in_aton 96 86 -10

---

 net/core/utils.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/core/utils.c +1 -1
@@ -51,7 +51,7 @@ EXPORT_SYMBOL(net_ratelimit);
 
 __be32 in_aton(const char *str)
 {
-	unsigned long l;
+	unsigned int l;
 	unsigned int val;
 	int i;
 
maintainer Applied
#1 lore raw

From: Alexey Dobriyan <[email protected]>
Date: Fri, 24 Mar 2017 00:58:26 +0300

Quoted 9 lines

Converting IPv4 address doesn't need 64-bit arithmetic.

Space savings: 10 bytes!

add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-10 (-10)
function old new delta
in_aton 96 86 -10

Applied to net-next, thanks.