Skip to contentSkip to conversation

net: Removing useless casts

PATCH Applied [email protected] 2 participants 2 messages Jul 21, 2006

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

PATCH 1/4 net: Removing useless casts

From: Panagiotis Issaris <[email protected]>

Removing useless casts

---
 net/tipc/discover.c |    2 +-
 net/tipc/ref.c      |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
net/tipc/discover.c +1 -1
index 2b84412..ee94de9 100644
@@ -295,7 +295,7 @@ struct link_req *tipc_disc_init_link_req
 {
 	struct link_req *req;
 
-	req = (struct link_req *)kmalloc(sizeof(*req), GFP_ATOMIC);
+	req = kmalloc(sizeof(*req), GFP_ATOMIC);
 	if (!req)
 		return NULL;
 
net/tipc/ref.c +1 -1
index 596d3c8..e6d6ae2 100644
@@ -79,7 +79,7 @@ int tipc_ref_table_init(u32 requested_si
 	while (sz < requested_size) {
 		sz <<= 1;
 	}
-	table = (struct reference *)vmalloc(sz * sizeof(struct reference));
+	table = vmalloc(sz * sizeof(*table));
 	if (table == NULL)
 		return -ENOMEM;
 
Signature · 1 line
1.4.2.rc1.ge7a0-dirty