summaryrefslogtreecommitdiff
path: root/gpsd.c
diff options
context:
space:
mode:
Diffstat (limited to 'gpsd.c')
-rw-r--r--gpsd.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gpsd.c b/gpsd.c
index bb8bfde4..ef73014f 100644
--- a/gpsd.c
+++ b/gpsd.c
@@ -2063,6 +2063,7 @@ int main(int argc, char *argv[])
/* make default devices accessible even after we drop privileges */
for (i = optind; i < argc; i++)
+ /* coverity[toctou] */
if (stat(argv[i], &stb) == 0)
(void)chmod(argv[i], stb.st_mode | S_IRGRP | S_IWGRP);
/*
@@ -2131,6 +2132,14 @@ int main(int argc, char *argv[])
struct sigaction sa;
sa.sa_flags = 0;
+#ifdef __linux__
+ /*
+ * Obsolete and unused. We're really only doing this to pacify Coverity
+ * which otherwise throws an UNINIT event here. Don't swap with the
+ * handler initialization, they're unioned on some architectures.
+ */
+ sa.sa_restorer = NULL;
+#endif /* __linux__ */
sa.sa_handler = onsig;
(void)sigfillset(&sa.sa_mask);
(void)sigaction(SIGHUP, &sa, NULL);