diff options
author | Guy Harris <gharris@sonic.net> | 2021-04-30 03:18:25 -0700 |
---|---|---|
committer | Guy Harris <gharris@sonic.net> | 2021-04-30 03:19:19 -0700 |
commit | 57a1514ac74527651ad42dca3041f3f53509317e (patch) | |
tree | a69a01eaeac3d625a5312930fa81f0a3c6b12e96 /epan/dissectors/packet-ieee80211.c | |
parent | 09147397007c5456fd5acd4794b5ba15330bdad3 (diff) |
Cast away the return value of g_strlcpy() and g_strlcat().
Most of the time, the return value tells us nothing useful, as we've
already decided that we're perfectly willing to live with string
truncation. Hopefully this keeps Coverity from whining that those
routines could return an error code (NARRATOR: They don't) and thus that
we're ignoring the possibility of failure (as indicated, we've already
decided that we can live with string truncation, so truncation is *NOT*
a failure).
Diffstat (limited to 'epan/dissectors/packet-ieee80211.c')
-rw-r--r-- | epan/dissectors/packet-ieee80211.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/epan/dissectors/packet-ieee80211.c b/epan/dissectors/packet-ieee80211.c index 96a511fd6c..01c02b097b 100644 --- a/epan/dissectors/packet-ieee80211.c +++ b/epan/dissectors/packet-ieee80211.c @@ -33615,15 +33615,15 @@ dissect_ieee80211_common(tvbuff_t *tvb, packet_info *pinfo, } if (algorithm == PROTECTION_ALG_WEP) { - g_strlcpy(wlan_stats.protection, "WEP", MAX_PROTECT_LEN); + (void) g_strlcpy(wlan_stats.protection, "WEP", MAX_PROTECT_LEN); } else if (algorithm == PROTECTION_ALG_TKIP) { - g_strlcpy(wlan_stats.protection, "TKIP", MAX_PROTECT_LEN); + (void) g_strlcpy(wlan_stats.protection, "TKIP", MAX_PROTECT_LEN); } else if (algorithm == PROTECTION_ALG_CCMP || algorithm == PROTECTION_ALG_CCMP_256) { - g_strlcpy(wlan_stats.protection, "CCMP", MAX_PROTECT_LEN); + (void) g_strlcpy(wlan_stats.protection, "CCMP", MAX_PROTECT_LEN); } else if (algorithm == PROTECTION_ALG_GCMP || algorithm == PROTECTION_ALG_GCMP_256) { - g_strlcpy(wlan_stats.protection, "GCMP", MAX_PROTECT_LEN); + (void) g_strlcpy(wlan_stats.protection, "GCMP", MAX_PROTECT_LEN); } else { - g_strlcpy(wlan_stats.protection, "Unknown", MAX_PROTECT_LEN); + (void) g_strlcpy(wlan_stats.protection, "Unknown", MAX_PROTECT_LEN); } /* protection header */ @@ -34909,7 +34909,7 @@ set_dot11decrypt_keys(void) /* XXX - This just lops the end if the key off if it's too long. * Should we handle this more gracefully? */ - g_strlcpy(key.UserPwd.Passphrase, dk->key->str, DOT11DECRYPT_WPA_PASSPHRASE_MAX_LEN+1); + (void) g_strlcpy(key.UserPwd.Passphrase, dk->key->str, DOT11DECRYPT_WPA_PASSPHRASE_MAX_LEN+1); key.UserPwd.SsidLen = 0; if ((dk->ssid != NULL) && (dk->ssid->len <= DOT11DECRYPT_WPA_SSID_MAX_LEN)) |