diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2009-09-10 18:50:49 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2009-09-10 18:50:49 +0000 |
commit | dab1629290cc471813952ac03f5b031b7efb2533 (patch) | |
tree | cf059f2d428535f2ae2b96fb660aa2663b1dc542 /gpsd.c | |
parent | fc1df0c4a76b31b805fb7de588c27ea8b7e58848 (diff) | |
download | gpsd-dab1629290cc471813952ac03f5b031b7efb2533.tar.gz |
Guard some inclusions that splint doesn't like.
No effect on compilation. All regression tests pass.
Diffstat (limited to 'gpsd.c')
-rw-r--r-- | gpsd.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -6,7 +6,9 @@ #include <sys/un.h> #include <netinet/in.h> #include <arpa/inet.h> +#ifndef S_SPLINT_S #include <unistd.h> +#endif /* S_SPLINT_S */ #include <stdlib.h> #include <syslog.h> #include <signal.h> @@ -2000,6 +2002,7 @@ int main(int argc, char *argv[]) * It requires that all GPS devices have their group read/write * permissions set. */ + /*@-type@*/ if ((optind<argc&&stat(argv[optind], &stb)==0)||stat(PROTO_TTY,&stb)==0) { gpsd_report(LOG_PROG, "changing to group %d\n", stb.st_gid); if (setgid(stb.st_gid) != 0) @@ -2015,6 +2018,7 @@ int main(int argc, char *argv[]) pw = getpwnam(GPSD_USER); if (pw) (void)seteuid(pw->pw_uid); + /*@+type@*/ } gpsd_report(LOG_INF, "running with effective group ID %d\n", getegid()); gpsd_report(LOG_INF, "running with effective user ID %d\n", geteuid()); |