summaryrefslogtreecommitdiff
path: root/utils/shd.c
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1995-07-07 02:49:54 +0000
committerMichael I. Bushnell <mib@gnu.org>1995-07-07 02:49:54 +0000
commit776df4bcb6a09530c835874ac8ef4aaf00451f5b (patch)
tree7027e5aa7cf05bee6edbc3db6637debc87d1f71c /utils/shd.c
parent4525f775fe58718576ab424eff5df5b3ae92c442 (diff)
(run): Remove assignments from inside if tests.
(command): Likewise.
Diffstat (limited to 'utils/shd.c')
-rw-r--r--utils/shd.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/utils/shd.c b/utils/shd.c
index eb058118..cb4b0ad0 100644
--- a/utils/shd.c
+++ b/utils/shd.c
@@ -92,7 +92,8 @@ run (char **argv, int fd0, int fd1)
task_t task;
pid_t pid;
- if (errno = task_create (mach_task_self (), 0, &task))
+ errno = task_create (mach_task_self (), 0, &task);
+ if (errno)
{
perror ("task_create");
pid = -1;
@@ -135,7 +136,8 @@ run (char **argv, int fd0, int fd1)
pid = task2pid (task);
if (pid == -1)
perror ("task2pid"), pid = 0;
- if (errno = proc_child (proc, task))
+ errno = proc_child (proc, task);
+ if (errno)
perror ("proc_child");
if (pause_startup)
{
@@ -157,7 +159,8 @@ run (char **argv, int fd0, int fd1)
if (errno)
{
perror ("_hurd_exec");
- if (errno = task_terminate (task))
+ errno = task_terminate (task);
+ if (errno)
perror ("task_terminate");
}
mach_port_deallocate (mach_task_self (), task);
@@ -177,7 +180,8 @@ command (int argc, char **argv)
int i, start;
int fds[2] = { 0, 1 };
- if (bg = !strcmp (argv[argc - 1], "&"))
+ bg = !strcmp (argv[argc - 1], "&");
+ if (bg)
argv[--argc] = NULL;
start = 0;