aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--gtk/wlan_stat_dlg.c10
-rw-r--r--tap-iostat.c2
2 files changed, 5 insertions, 7 deletions
diff --git a/gtk/wlan_stat_dlg.c b/gtk/wlan_stat_dlg.c
index fc1c43c82b..00c22157a6 100644
--- a/gtk/wlan_stat_dlg.c
+++ b/gtk/wlan_stat_dlg.c
@@ -237,8 +237,7 @@ alloc_wlan_ep (struct _wlan_hdr *si, packet_info *pinfo _U_)
if (!si)
return NULL;
- if (!(ep = g_malloc (sizeof(wlan_ep_t))))
- return NULL;
+ ep = g_malloc (sizeof(wlan_ep_t));
SE_COPY_ADDRESS (&ep->bssid, &si->bssid);
ep->stats.channel = si->stats.channel;
@@ -387,10 +386,9 @@ wlanstat_packet (void *phs, packet_info *pinfo, epan_dissect_t *edt _U_, const v
}
if (!te) {
- if ((te = alloc_wlan_ep (si, pinfo))) {
- te->next = hs->ep_list;
- hs->ep_list = te;
- }
+ te = alloc_wlan_ep (si, pinfo);
+ te->next = hs->ep_list;
+ hs->ep_list = te;
}
if (!te->probe_req_searched && (si->type != 0x04) && (te->type[0x04] == 0) &&
diff --git a/tap-iostat.c b/tap-iostat.c
index bb1180479b..8ff9e3078c 100644
--- a/tap-iostat.c
+++ b/tap-iostat.c
@@ -530,7 +530,7 @@ register_io_tap(io_stat_t *io, int i, const char *filter)
break;
}
}
- if(io->items[i].calc_type!=CALC_TYPE_BYTES){
+ if(hfi && io->items[i].calc_type!=CALC_TYPE_BYTES){
/* check that the type is compatible */
switch(hfi->type){
case FT_UINT8: