]> diplodocus.org Git - nmh/blobdiff - uip/slocal.c
Added tests of MMDF mailbox format to test-eom-align.
[nmh] / uip / slocal.c
index 723cb27a26114d2f23b96ba4ab62fa77590e6b7a..df02d0d15902275d7ad079f8de4c5064a9491bb4 100644 (file)
@@ -26,6 +26,7 @@
 #include <setjmp.h>
 #include <h/tws.h>
 #include <h/mts.h>
+#include "h/done.h"
 #include <h/utils.h>
 #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;
 }
 
 /*