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-ncp2222.inc | |
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-ncp2222.inc')
-rw-r--r-- | epan/dissectors/packet-ncp2222.inc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/epan/dissectors/packet-ncp2222.inc b/epan/dissectors/packet-ncp2222.inc index 85ac889b08..a24570fa62 100644 --- a/epan/dissectors/packet-ncp2222.inc +++ b/epan/dissectors/packet-ncp2222.inc @@ -2117,7 +2117,7 @@ ncp_hash_insert(conversation_t *conversation, guint8 nw_sequence, request_value->req_nds_flags = 0; request_value->nds_request_verb = 0; request_value->nds_version = 0; - g_strlcpy(request_value->object_name, "", 256); + (void) g_strlcpy(request_value->object_name, "", 256); request_value->nds_frag = TRUE; wmem_map_insert(ncp_req_hash, request_key, request_value); @@ -2137,7 +2137,7 @@ ncp_eid_hash_insert(guint32 nw_eid) request_eid_key->nw_eid = nw_eid; request_eid_value = wmem_new0(wmem_file_scope(), ncp_req_eid_hash_value); - g_strlcpy(request_eid_value->object_name, "", 256); + (void) g_strlcpy(request_eid_value->object_name, "", 256); wmem_map_insert(ncp_req_eid_hash, request_eid_key, request_eid_value); @@ -5253,7 +5253,7 @@ process_multivalues(proto_tree *ncp_tree, tvbuff_t *tvb, packet_info *pinfo, nds ioffset = ioffset + 4; ioffset = print_es_type(estree, tvb, values, value3, ioffset); /* values.vstring is being overwritten. So store the resolve name to a global value */ - g_strlcpy(mv_resolve_name_string, values->vstring, 128); + (void) g_strlcpy(mv_resolve_name_string, values->vstring, 128); value4 = tvb_get_letohl(tvb, ioffset); aitem = proto_tree_add_uint_format(ntree, hf_referral_record, tvb, ioffset, 4, value4, "Referral Protocols - %u", value4); @@ -7961,7 +7961,7 @@ dissect_nds_reply(tvbuff_t *tvb, packet_info *pinfo, if (!request_eid_value) { request_eid_value = ncp_eid_hash_insert(global_eid); if (global_object_name != NULL) - g_strlcpy(request_eid_value->object_name, global_object_name, 256); + (void) g_strlcpy(request_eid_value->object_name, global_object_name, 256); else request_eid_value->object_name[0] = '\0'; } @@ -8509,7 +8509,7 @@ dissect_nds_request(tvbuff_t *tvb, packet_info *pinfo, col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", global_object_name); if (!pinfo->fd->visited) { if (request_value) - g_strlcpy(request_value->object_name, global_object_name, 256); + (void) g_strlcpy(request_value->object_name, global_object_name, 256); } foffset += 4+value1; foffset += align_4(tvb, foffset); @@ -8563,7 +8563,7 @@ dissect_nds_request(tvbuff_t *tvb, packet_info *pinfo, col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", global_object_name); if (!pinfo->fd->visited) { if (request_value) - g_strlcpy(request_value->object_name, global_object_name, 256); + (void) g_strlcpy(request_value->object_name, global_object_name, 256); } foffset += 4+value1; foffset += align_4(tvb, foffset); @@ -8719,7 +8719,7 @@ dissect_nds_request(tvbuff_t *tvb, packet_info *pinfo, col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", global_object_name); if (!pinfo->fd->visited) { if (request_value) - g_strlcpy(request_value->object_name, global_object_name, 256); + (void) g_strlcpy(request_value->object_name, global_object_name, 256); } foffset += 4+value1; foffset += align_4(tvb, foffset); @@ -8863,7 +8863,7 @@ dissect_nds_request(tvbuff_t *tvb, packet_info *pinfo, col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", global_object_name); if (!pinfo->fd->visited) { if (request_value) - g_strlcpy(request_value->object_name, global_object_name, 256); + (void) g_strlcpy(request_value->object_name, global_object_name, 256); } foffset += 4+value1; foffset += align_4(tvb, foffset); @@ -8942,7 +8942,7 @@ dissect_nds_request(tvbuff_t *tvb, packet_info *pinfo, col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", global_object_name); if (!pinfo->fd->visited) { if (request_value) - g_strlcpy(request_value->object_name, global_object_name, 256); + (void) g_strlcpy(request_value->object_name, global_object_name, 256); } foffset += 4+value1; foffset += align_4(tvb, foffset); @@ -8972,7 +8972,7 @@ dissect_nds_request(tvbuff_t *tvb, packet_info *pinfo, col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", global_object_name); if (!pinfo->fd->visited) { if (request_value) - g_strlcpy(request_value->object_name, global_object_name, 256); + (void) g_strlcpy(request_value->object_name, global_object_name, 256); } break; case 0x0e: /* Not Defined */ @@ -9018,7 +9018,7 @@ dissect_nds_request(tvbuff_t *tvb, packet_info *pinfo, col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", global_object_name); if (!pinfo->fd->visited) { if (request_value) - g_strlcpy(request_value->object_name, global_object_name, 256); + (void) g_strlcpy(request_value->object_name, global_object_name, 256); } foffset += 4+value1; foffset += align_4(tvb, foffset); @@ -9044,7 +9044,7 @@ dissect_nds_request(tvbuff_t *tvb, packet_info *pinfo, col_append_fstr(pinfo->cinfo, COL_INFO, " -> %s", global_object_name); if (!pinfo->fd->visited) { if (request_value) - g_strlcpy(request_value->object_name, global_object_name, 256); + (void) g_strlcpy(request_value->object_name, global_object_name, 256); } break; case 0x12: |