From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx.kolabnow.com ([95.128.36.42]) by ewsd; Sun Jun 14 19:32:17 EDT 2020 Received: from localhost (unknown [127.0.0.1]) by ext-mx-out003.mykolab.com (Postfix) with ESMTP id 87D5540BE2 for <9front@9front.org>; Mon, 15 Jun 2020 01:32:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kolabnow.com; h= content-language:content-transfer-encoding:content-type :content-type:mime-version:date:date:message-id:subject:subject :from:from:received:received:received; s=dkim20160331; t= 1592177532; x=1593991933; bh=BtfZh6HDr78Q7v6Ygc/9eO645lcoYUAco0m jXSUeUjM=; b=m2kpA6piUbqi/ngRtDNzcOIA/h48PT/kO3ChC/mTn3TuLJjV3ce wjuT4KpxCW+3+reeAK1wiusJf80+WUZDlN/0Tnc6cWOQ60d3PQJDV70jBEZeHBru oI5b+9eBG4k7J+KAyr7wpl1JrmXtO+yMvDmoExW0t05p913ruYa9qMS3/Sf9r/T/ YIy+/hQGtGu7Zr0IBxoV8uX5Y9xvT0cd2+A67G1H+ZvKTpiMTlCsYcK/INLaV1UB gETFO4cQPI2ykeWgbLa87bDBJbzUx7KgWmYt1iZKEOE6/UZS4MWjkAqVWWijSkaD zEpCdUgUKQE6XX6GnMZFLqqpceTbD2OHtf78n0BXnBy5NtK455Jml6T+3IZzlLJ3 ZLg1ZgJPHGQpwmufKfTdZf49xsg1iC7Xcw23KnwbKKaqXKn09+FFt2VrKZQBOt0A wFdQajJ+4APhaL5Zj41h61AHwOJV1+LYvUOqm8GS+Q8WLgtx4k6LANbERuvwv94L A1qVc6YbgOKf9UcggPvI5KTgF2X7lIGGo2Btj+o7NAiNbv/1+uTrm2fDQKKZddPG gf7eoe9UfcnAoL/2QRqkPepZyUWAfvroBcKZji7M6N0egZKLzrQ0b/2oI72q0s8N 8Unwhyee2NUdj+vtX8i7N9hoodcKX1FDkOHhUW7KYEIJ8mGwPiO4ddK8= X-Virus-Scanned: amavisd-new at mykolab.com X-Spam-Flag: NO X-Spam-Score: -1.9 X-Spam-Level: X-Spam-Status: No, score=-1.9 tagged_above=-10 required=5 tests=[BAYES_00=-1.9] autolearn=ham autolearn_force=no Received: from mx.kolabnow.com ([127.0.0.1]) by localhost (ext-mx-out003.mykolab.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OsC3CLlRpv3R for <9front@9front.org>; Mon, 15 Jun 2020 01:32:12 +0200 (CEST) Received: from int-mx003.mykolab.com (unknown [10.9.13.3]) by ext-mx-out003.mykolab.com (Postfix) with ESMTPS id 03415403E1 for <9front@9front.org>; Mon, 15 Jun 2020 01:32:11 +0200 (CEST) Received: from ext-subm002.mykolab.com (unknown [10.9.6.2]) by int-mx003.mykolab.com (Postfix) with ESMTPS id A6507AA1 for <9front@9front.org>; Mon, 15 Jun 2020 01:32:11 +0200 (CEST) To: 9front@9front.org From: Ali Fardan Subject: init.c: remove unnecessary if() statement Message-ID: <83f595d0-8074-fdc0-62fe-91dc81c66cbe@dysnomia.info> Date: Mon, 15 Jun 2020 02:32:08 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: quoted-printable List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: hardware rich-client manager in rcexec() there's no need to check for if(manual || iscpu) since if=20 cmd is nil and service !=3D terminal /bin/rc will be executed without arguments anyway. Thoughts? diff -r 6055167dc76a sys/src/cmd/init.c --- a/sys/src/cmd/init.c=C2=A0=C2=A0=C2=A0 Mon Jun 15 00:12:57 2020 +0200 +++ b/sys/src/cmd/init.c=C2=A0=C2=A0=C2=A0 Mon Jun 15 02:27:53 2020 +0300 @@ -140,8 +140,6 @@ =C2=A0{ =C2=A0=C2=A0=C2=A0=C2=A0 if(cmd) =C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 execl("/bin/rc", "rc", "-c",= cmd, nil); -=C2=A0=C2=A0=C2=A0 else if(manual || iscpu) -=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 execl("/bin/rc", "rc", nil); =C2=A0=C2=A0=C2=A0=C2=A0 else if(strcmp(service, "terminal") =3D=3D 0) =C2=A0=C2=A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0 execl("/bin/rc", "rc", "-c",= ". /rc/bin/termrc;=20 home=3D/usr/$user; cd && . ./lib/profile", nil); =C2=A0=C2=A0=C2=A0=C2=A0 else