mirror of
https://github.com/opnsense/src.git
synced 2026-06-14 19:20:18 -04:00
Remove store-only variable and unnecessary bzero()
- Remove the variable set but not used to fix build on -CURRENT - Remove bzero() on the space malloc'd with M_ZERO flag. Signed-off-by: En-Wei Wu <enweiwu@FreeBSD.org> Sponsored by: Google, Inc. (GSoC 2022) Differential Revision: https://reviews.freebsd.org/D35624
This commit is contained in:
parent
bc49526a56
commit
cf337fcd74
3 changed files with 2 additions and 6 deletions
|
|
@ -446,7 +446,6 @@ wtap_rx_proc(void *arg, int npending)
|
|||
struct ieee80211com *ic = &sc->sc_ic;
|
||||
struct mbuf *m;
|
||||
struct ieee80211_node *ni;
|
||||
int type;
|
||||
struct wtap_buf *bf;
|
||||
|
||||
#if 0
|
||||
|
|
@ -487,10 +486,10 @@ wtap_rx_proc(void *arg, int npending)
|
|||
/*
|
||||
* Sending station is known, dispatch directly.
|
||||
*/
|
||||
type = ieee80211_input(ni, m, 1<<7, 10);
|
||||
ieee80211_input(ni, m, 1<<7, 10);
|
||||
ieee80211_free_node(ni);
|
||||
} else {
|
||||
type = ieee80211_input_all(ic, m, 1<<7, 10);
|
||||
ieee80211_input_all(ic, m, 1<<7, 10);
|
||||
}
|
||||
NET_EPOCH_EXIT(et);
|
||||
|
||||
|
|
|
|||
|
|
@ -143,7 +143,6 @@ event_handler(module_t module, int event, void *arg)
|
|||
GID_WHEEL,0600,(const char *)"wtapctl");
|
||||
hal = (struct wtap_hal *)malloc(sizeof(struct wtap_hal),
|
||||
M_WTAP, M_NOWAIT | M_ZERO);
|
||||
bzero(hal, sizeof(struct wtap_hal));
|
||||
|
||||
init_hal(hal);
|
||||
|
||||
|
|
|
|||
|
|
@ -69,7 +69,6 @@ init_hal(struct wtap_hal *hal)
|
|||
|
||||
hal->hal_md = (struct wtap_medium *)malloc(sizeof(struct wtap_medium),
|
||||
M_WTAP, M_NOWAIT | M_ZERO);
|
||||
bzero(hal->hal_md, sizeof(struct wtap_medium));
|
||||
|
||||
init_medium(hal->hal_md);
|
||||
/* register event handler for packets */
|
||||
|
|
@ -181,7 +180,6 @@ new_wtap(struct wtap_hal *hal, int32_t id)
|
|||
|
||||
hal->hal_devs[id] = (struct wtap_softc *)malloc(
|
||||
sizeof(struct wtap_softc), M_WTAP, M_NOWAIT | M_ZERO);
|
||||
bzero(hal->hal_devs[id], sizeof(struct wtap_softc));
|
||||
hal->hal_devs[id]->sc_md = hal->hal_md;
|
||||
hal->hal_devs[id]->id = id;
|
||||
snprintf(hal->hal_devs[id]->name, sizeof(hal->hal_devs[id]->name),
|
||||
|
|
|
|||
Loading…
Reference in a new issue