aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/cosine.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/cosine.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/cosine.c')
-rw-r--r--wiretap/cosine.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/wiretap/cosine.c b/wiretap/cosine.c
index 130a7c9a1c..18ecddd293 100644
--- a/wiretap/cosine.c
+++ b/wiretap/cosine.c
@@ -203,7 +203,7 @@ static gint64 cosine_seek_next_packet(wtap *wth, int *err, gchar **err_info,
}
if (strstr(buf, COSINE_REC_MAGIC_STR1) ||
strstr(buf, COSINE_REC_MAGIC_STR2)) {
- g_strlcpy(hdr, buf, COSINE_LINE_LENGTH);
+ (void) g_strlcpy(hdr, buf, COSINE_LINE_LENGTH);
return cur_off;
}
}
@@ -421,7 +421,7 @@ parse_cosine_packet(FILE_T fh, wtap_rec *rec, Buffer *buf,
} else if (strncmp(direction, "l2-rx", 5) == 0) {
pseudo_header->cosine.direction = COSINE_DIR_RX;
}
- g_strlcpy(pseudo_header->cosine.if_name, if_name,
+ (void) g_strlcpy(pseudo_header->cosine.if_name, if_name,
COSINE_MAX_IF_NAME_LEN);
pseudo_header->cosine.pro = pro;
pseudo_header->cosine.off = off;