X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Frcvtty.c;h=69a903116fe56e9ed9633b962a56ada26fa756fa;hb=ac79e8d6a1a8a3cb3fb2438b03d3d0ba5ea2570d;hp=cb194dd56fc161df55c6b952af24404654222172;hpb=0ccd1945560c715e4cc4063209bd0d68b75d5470;p=mmh diff --git a/uip/rcvtty.c b/uip/rcvtty.c index cb194dd..69a9031 100644 --- a/uip/rcvtty.c +++ b/uip/rcvtty.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include @@ -47,7 +48,7 @@ static struct swit switches[] = { #define VERSIONSW 8 { "version", 0 }, #define HELPSW 9 - { "help", 4 }, + { "help", 0 }, { NULL, 0 } }; @@ -167,6 +168,7 @@ main (int argc, char **argv) fclose (uf); exit (RCV_MOK); + return 0; /* dead code to satisfy the compiler */ } @@ -190,13 +192,13 @@ message_fd (char **vec) struct stat st; #ifdef HAVE_MKSTEMP - unlink (mkstemp (strncpy (tmpfil, "/tmp/rcvttyXXXXX", sizeof(tmpfil)))); + fd = 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); +#endif if ((child_id = vfork()) == NOTOK) { /* fork error */ @@ -243,6 +245,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 */ }