X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/78290c874170b39a1f87d1dcbd80d03fa6a6ab05..63621a81d16ab743de6b57d47578a9a2c670ad22:/uip/slocal.c diff --git a/uip/slocal.c b/uip/slocal.c index bd751a1f..fe027ee2 100644 --- a/uip/slocal.c +++ b/uip/slocal.c @@ -27,8 +27,8 @@ #include #include #include -#include "../sbr/lock_file.h" -#include "../sbr/m_mktemp.h" +#include "sbr/lock_file.h" +#include "sbr/m_mktemp.h" #include #include @@ -1046,7 +1046,7 @@ usr_pipe (int fd_arg, char *cmd, char *pgm, char **vec, int suppress) { volatile int fd = fd_arg; pid_t child_id; - int i, bytes, seconds, status; + int bytes, seconds, status; struct stat st; if (verbose && !suppress) @@ -1054,9 +1054,7 @@ usr_pipe (int fd_arg, char *cmd, char *pgm, char **vec, int suppress) lseek(fd, 0, SEEK_SET); - for (i = 0; (child_id = fork()) == -1 && i < 5; i++) - sleep (5); - + child_id = fork(); switch (child_id) { case -1: /* fork error */ @@ -1295,7 +1293,7 @@ fputs_error: static char * trim (char *cp) { - char buffer[BUFSIZ*4]; + static char buffer[BUFSIZ * 4]; char *bp, *sp; if (cp == NULL) @@ -1322,8 +1320,7 @@ trim (char *cp) if (isspace((unsigned char) *sp)) *sp = ' '; - /* now return a copy */ - return mh_xstrdup(bp); + return bp; } /*