aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/nettrace_3gpp_32_423.c
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2021-04-30 03:18:25 -0700
committerGuy Harris <gharris@sonic.net>2021-04-30 03:19:19 -0700
commit57a1514ac74527651ad42dca3041f3f53509317e (patch)
treea69a01eaeac3d625a5312930fa81f0a3c6b12e96 /wiretap/nettrace_3gpp_32_423.c
parent09147397007c5456fd5acd4794b5ba15330bdad3 (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 'wiretap/nettrace_3gpp_32_423.c')
-rw-r--r--wiretap/nettrace_3gpp_32_423.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/wiretap/nettrace_3gpp_32_423.c b/wiretap/nettrace_3gpp_32_423.c
index 23c0276674..a230c1e2a9 100644
--- a/wiretap/nettrace_3gpp_32_423.c
+++ b/wiretap/nettrace_3gpp_32_423.c
@@ -146,7 +146,7 @@ nettrace_parse_address(char* curr_pos, char* next_pos, gboolean is_src_addr, exp
curr_pos = skip_pos;
- g_strlcpy(str, curr_pos, 3);
+ (void) g_strlcpy(str, curr_pos, 3);
/* If we find "" here we have no IP address */
if (strcmp(str, "\"\"") == 0) {
return next_pos;
@@ -168,7 +168,7 @@ nettrace_parse_address(char* curr_pos, char* next_pos, gboolean is_src_addr, exp
if (str_len > WS_INET6_ADDRSTRLEN) {
return next_pos;
}
- g_strlcpy(ip_addr_str, curr_pos, str_len);
+ (void) g_strlcpy(ip_addr_str, curr_pos, str_len);
curr_pos = end_pos;
if (ws_inet_pton6(ip_addr_str, &ip6_addr)) {
if (is_src_addr) {
@@ -332,7 +332,7 @@ nettrace_msg_to_packet(nettrace_3gpp_32_423_file_info_t *file_info, wtap_rec *re
goto end;
}
- g_strlcpy(name_str, curr_pos, (gsize)name_str_len + 1);
+ (void) g_strlcpy(name_str, curr_pos, (gsize)name_str_len + 1);
ascii_strdown_inplace(name_str);
}
@@ -392,7 +392,7 @@ nettrace_msg_to_packet(nettrace_3gpp_32_423_file_info_t *file_info, wtap_rec *re
status = FALSE;
goto end;
}
- g_strlcpy(proto_name_str, curr_pos, (gsize)proto_str_len+1);
+ (void) g_strlcpy(proto_name_str, curr_pos, (gsize)proto_str_len+1);
ascii_strdown_inplace(proto_name_str);
/* Do string matching and replace with Wiresharks protocol name */
@@ -404,7 +404,7 @@ nettrace_msg_to_packet(nettrace_3gpp_32_423_file_info_t *file_info, wtap_rec *re
/* XXX Do we need to check for function="S1"? */
if (strcmp(proto_name_str, "nas") == 0) {
/* Change to nas-eps_plain */
- g_strlcpy(proto_name_str, c_nas_eps, sizeof(c_nas_eps));
+ (void) g_strlcpy(proto_name_str, c_nas_eps, sizeof(c_nas_eps));
proto_str_len = CLEN(c_nas_eps);
}
if (strcmp(proto_name_str, "map") == 0) {
@@ -415,14 +415,14 @@ nettrace_msg_to_packet(nettrace_3gpp_32_423_file_info_t *file_info, wtap_rec *re
if (strcmp(name_str, "sai_request") == 0) {
use_proto_table = TRUE;
- g_strlcpy(dissector_table_str, c_sai_req, sizeof(c_sai_req));
+ (void) g_strlcpy(dissector_table_str, c_sai_req, sizeof(c_sai_req));
dissector_table_str_len = CLEN(c_sai_req);
dissector_table_val = 56;
exported_pdu_info.presence_flags |= EXP_PDU_TAG_COL_PROT_BIT;
}
else if (strcmp(name_str, "sai_response") == 0) {
use_proto_table = TRUE;
- g_strlcpy(dissector_table_str, c_sai_rsp, sizeof(c_sai_rsp));
+ (void) g_strlcpy(dissector_table_str, c_sai_rsp, sizeof(c_sai_rsp));
dissector_table_str_len = CLEN(c_sai_rsp);
dissector_table_val = 56;
exported_pdu_info.presence_flags |= EXP_PDU_TAG_COL_PROT_BIT;