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 /wiretap/log3gpp.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 'wiretap/log3gpp.c')
-rw-r--r-- | wiretap/log3gpp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/wiretap/log3gpp.c b/wiretap/log3gpp.c index a23bb9039a..fa8bb2cdc2 100644 --- a/wiretap/log3gpp.c +++ b/wiretap/log3gpp.c @@ -751,11 +751,11 @@ int write_stub_header(guchar *frame_buffer, char *timestamp_string, int stub_offset = 0; /* Timestamp within file */ - g_strlcpy((char*)&frame_buffer[stub_offset], timestamp_string, MAX_TIMESTAMP_LEN+1); + (void) g_strlcpy((char*)&frame_buffer[stub_offset], timestamp_string, MAX_TIMESTAMP_LEN+1); stub_offset += (int)(strlen(timestamp_string) + 1); /* Protocol name */ - g_strlcpy((char*)&frame_buffer[stub_offset], protocol_name, MAX_PROTOCOL_NAME+1); + (void) g_strlcpy((char*)&frame_buffer[stub_offset], protocol_name, MAX_PROTOCOL_NAME+1); stub_offset += (int)(strlen(protocol_name) + 1); /* Direction */ @@ -763,7 +763,7 @@ int write_stub_header(guchar *frame_buffer, char *timestamp_string, stub_offset++; /* Option string (might be string of length 0) */ - g_strlcpy((char*)&frame_buffer[stub_offset], protocol_parameters,MAX_PROTOCOL_PAR_STRING+1); + (void) g_strlcpy((char*)&frame_buffer[stub_offset], protocol_parameters,MAX_PROTOCOL_PAR_STRING+1); stub_offset += (int)(strlen(protocol_parameters) + 1); return stub_offset; } |