From: Ali Fardan <root@dysnomia.info>
To: 9front@9front.org
Subject: init.c: remove unnecessary if() statement
Date: Mon, 15 Jun 2020 02:32:08 +0300 [thread overview]
Message-ID: <83f595d0-8074-fdc0-62fe-91dc81c66cbe@dysnomia.info> (raw)
in rcexec() there's no need to check for if(manual || iscpu) since if
cmd is nil and service != terminal
/bin/rc will be executed without arguments anyway.
Thoughts?
diff -r 6055167dc76a sys/src/cmd/init.c
--- a/sys/src/cmd/init.c Mon Jun 15 00:12:57 2020 +0200
+++ b/sys/src/cmd/init.c Mon Jun 15 02:27:53 2020 +0300
@@ -140,8 +140,6 @@
{
if(cmd)
execl("/bin/rc", "rc", "-c", cmd, nil);
- else if(manual || iscpu)
- execl("/bin/rc", "rc", nil);
else if(strcmp(service, "terminal") == 0)
execl("/bin/rc", "rc", "-c", ". /rc/bin/termrc;
home=/usr/$user; cd && . ./lib/profile", nil);
else
next reply other threads:[~2020-06-14 23:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-14 23:32 Ali Fardan [this message]
2020-06-15 0:43 ` [9front] " Ali Fardan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83f595d0-8074-fdc0-62fe-91dc81c66cbe@dysnomia.info \
--to=root@dysnomia.info \
--cc=9front@9front.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).