X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/3b6170b27ba8fedbb4d67d2842bfaa38d4417962..8699f1cc:/uip/slocal.c?ds=sidebyside diff --git a/uip/slocal.c b/uip/slocal.c index 723cb27a..df02d0d1 100644 --- a/uip/slocal.c +++ b/uip/slocal.c @@ -26,6 +26,7 @@ #include #include #include +#include "h/done.h" #include #include "sbr/lock_file.h" #include "sbr/m_mktemp.h" @@ -636,7 +637,7 @@ usr_delivery (int fd, char *delivery, int su) } fclose (fp); - return (won ? 0 : -1); + return won ? 0 : -1; } @@ -931,13 +932,13 @@ logged_in (void) if (debug) continue; endutxent(); - return (utmped = DONE); + return utmped = DONE; } } endutxent(); #endif /* HAVE_GETUTXENT */ - return (utmped = NOTOK); + return utmped = NOTOK; } #define check(t,a,b) if (t < a || t > b) return -1 @@ -1091,7 +1092,7 @@ usr_pipe (int fd_arg, char *cmd, char *pgm, char **vec, int suppress) setenv("SHELL", pw->pw_shell, 1); execvp (pgm, vec); - _exit (-1); + _exit(1); default: /* parent process */ @@ -1121,7 +1122,7 @@ usr_pipe (int fd_arg, char *cmd, char *pgm, char **vec, int suppress) else pidstatus (status, stdout, ", failed"); } - return (status == 0 ? 0 : -1); + return status == 0 ? 0 : -1; } /* * Ruthlessly kill the child and anything @@ -1293,7 +1294,7 @@ fputs_error: static char * trim (char *cp) { - char buffer[BUFSIZ*4]; + static char buffer[BUFSIZ * 4]; char *bp, *sp; if (cp == NULL) @@ -1320,8 +1321,7 @@ trim (char *cp) if (isspace((unsigned char) *sp)) *sp = ' '; - /* now return a copy */ - return mh_xstrdup(bp); + return bp; } /*