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 /sharkd_daemon.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 'sharkd_daemon.c')
-rw-r--r-- | sharkd_daemon.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sharkd_daemon.c b/sharkd_daemon.c index c356798d4b..d5b587dbed 100644 --- a/sharkd_daemon.c +++ b/sharkd_daemon.c @@ -93,7 +93,7 @@ socket_init(char *path) memset(&s_un, 0, sizeof(s_un)); s_un.sun_family = AF_UNIX; - g_strlcpy(s_un.sun_path, path, sizeof(s_un.sun_path)); + (void) g_strlcpy(s_un.sun_path, path, sizeof(s_un.sun_path)); s_un_len = (socklen_t)(offsetof(struct sockaddr_un, sun_path) + strlen(s_un.sun_path)); @@ -432,13 +432,13 @@ sharkd_loop(int argc _U_, char* argv[]) if (mode <= SHARKD_MODE_CLASSIC_DAEMON) { - g_strlcat(command_line, "sharkd.exe -", sizeof(command_line)); + (void) g_strlcat(command_line, "sharkd.exe -", sizeof(command_line)); } else { // The -m option used here is an internal-only option that notifies the child process that it should // run in Gold Console mode - g_strlcat(command_line, "sharkd.exe -m", sizeof(command_line)); + (void) g_strlcat(command_line, "sharkd.exe -m", sizeof(command_line)); for (size_t i = 1; i < argc; i++) { @@ -451,8 +451,8 @@ sharkd_loop(int argc _U_, char* argv[]) } else { - g_strlcat(command_line, " ", sizeof(command_line)); - g_strlcat(command_line, argv[i], sizeof(command_line)); + (void) g_strlcat(command_line, " ", sizeof(command_line)); + (void) g_strlcat(command_line, argv[i], sizeof(command_line)); } } } |