Re: [hackers] [sbase][PATCH] Add nologin(8) (from ubase) and simplify it

From: Mattias Andrée <maandree_AT_kth.se>
Date: Mon, 4 Apr 2016 14:35:07 +0200

On Mon, 4 Apr 2016 14:30:38 +0200
Mattias Andrée <maandree_AT_kth.se> wrote:

> On Mon, 4 Apr 2016 09:24:52 -0300
> Lucas Gabriel Vuotto <l.vuotto92_AT_gmail.com> wrote:
>
> > On 04/04/16 08:22, Mattias Andrée wrote:
> > > +int
> > > +main(void)
> > > +{
> > > + FILE *fp;
> > > + if ((fp = fopen(NOLOGIN_PATH, "r"))) {
> > > + concat(fp, NOLOGIN_PATH, stdout,
> > > "<stdout>");
> > > + fshut(fp, NOLOGIN_PATH),
> > > fshut(stdout, "<stdout>");
> >
> > Shouldn't this be
> >
> > + fshut(fp, NOLOGIN_PATH);
> > + fshut(fp, stdout, "<stdout>");
>
> fshut(stdout, "<stdout>");
>
> >
> > ?
> >
> > Note the ',' at the end of the first fshut.
>
> If you dislike the sequence-operator.
> Otherwise it makes not difference.
> ',' works just like ';' accept all

s/accept/except/

> instructions count as one statement,
> so you do not need { }.


Received on Mon Apr 04 2016 - 14:35:07 CEST

This archive was generated by hypermail 2.3.0 : Mon Apr 04 2016 - 14:36:22 CEST