Skip to contentSkip to conversation

staging: wlan-ng: prism2mgmt.c: Drop void pointer cast

PATCH New Janani Ravichandran 1 participant 1 message Feb 25, 2016 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: wlan-ng: prism2mgmt.c: Drop void pointer cast

Void pointers don't need to be cast to other pointer types. Semantic patch used:

@r@
expression x;
void* e;
type T;
identifier f;
@@

(
*((T *)e)
|
((T *)x) [...]
|
((T *)x)->f
|
- (T *)
e
)

---
 drivers/staging/wlan-ng/prism2mgmt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/wlan-ng/prism2mgmt.c +1 -1
index 013a624..d8ed9a0 100644
@@ -375,7 +375,7 @@ int prism2mgmt_scan_results(wlandevice_t *wlandev, void *msgp)
 
 	int count;
 
-	req = (struct p80211msg_dot11req_scan_results *) msgp;
+	req = msgp;
 
 	req->resultcode.status = P80211ENUM_msgitem_status_data_ok;
 
Signature · 1 line
2.5.0