X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/1691e80890e5d8ba258c51c214a3e91880e1db2b..af1c787868b636316a63606e42ea0db2104573be:/uip/rcvtty.c diff --git a/uip/rcvtty.c b/uip/rcvtty.c index 9eb365f1..b847b563 100644 --- a/uip/rcvtty.c +++ b/uip/rcvtty.c @@ -167,6 +167,7 @@ main (int argc, char **argv) fclose (uf); exit (RCV_MOK); + return 0; /* dead code to satisfy the compiler */ } @@ -189,7 +190,11 @@ message_fd (char **vec) char tmpfil[BUFSIZ]; struct stat st; +#ifdef HAVE_MKSTEMP + unlink (mkstemp (strncpy (tmpfil, "/tmp/rcvttyXXXXX", sizeof(tmpfil)))); +#else unlink (mktemp (strncpy (tmpfil, "/tmp/rcvttyXXXXX", sizeof(tmpfil)))); +#endif if ((fd = open (tmpfil, O_RDWR | O_CREAT | O_TRUNC, 0600)) == NOTOK) return header_fd (); unlink (tmpfil); @@ -239,6 +244,7 @@ message_fd (char **vec) setpgid ((pid_t) 0, getpid ()); /* put in own process group */ execvp (vec[0], vec); _exit (-1); + return 1; /* dead code to satisfy compiler */ }