Re: [PATCH 2/4] flock: cleanup usage issues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tuesday 20 June 2017, Karel Zak wrote:
> On Mon, Jun 19, 2017 at 05:45:24PM +0200, Ruediger Meier wrote:
> > > > -static void usage(FILE * out) {
> > > > +static void usage(void) {
> > > > +    FILE * out = stdout;
> > > >      fputs(USAGE_HEADER, out);
> > > >      ...
> > > > }
> > >
> > > Yes, seems good, but I sure one day someone will ask:
> > >
> > >     what the hell are you doing with "out = stdout;" ?
> > >
> > > :-)
> >
> > Hehe I know :)
> >
> > This is all legacy. It's funny, eventhough I hate usage messages on
> > error, my new checkusage.sh script does it also that way. That's
> > how most simple commands are born ;)
>
> It would be better to make a conclusion (about FILE in the usage())
> and follow this conclusion in the patches. I don't think
>
>   FILE * out = stdout;
>
> and replace 'stderr' with 'out' is necessary step. It already changes
> all the lines with stderr, so why not use stdout?

Well, seems like I've had the talent to find the most unusal 3 files 
first.

You can postpone this pull request. I will send a big one all together,
Seems like I need to push some minor fixes separately before.

> If we agree about
>
>   fputs(_("text\n"), stdout);
>
> then we should do the change.
>
> BTW, maybe it would be possible to use Coccinelle to generate the
> patches :-)
>
> Comments?
>
>     Karel


--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux