Re: [PATCH 1/7] zramctl: print all devices as a default action

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

 



On Sun 03 Aug 2014 21:50:33 Sami Kerola wrote:
> On 3 August 2014 15:50, Mike Frysinger <vapier@xxxxxxxxxx> wrote:
> > On Sun 03 Aug 2014 15:17:37 Sami Kerola wrote:
> >> -static int zram_used(struct zram *z)
> >> +static int zram_used(struct zram *z, int find_unused)
> > 
> > s/int/bool/ ?
> 
> There's only handful of boolean types in use in util-linux

i think there should be more.  i find them more readable, clearer intent, and 
harder to screw up.  whereas passing around 0/1 everywhere gets funky (and i 
think the code looks funky already).

> util-linux> git grep -l 'bool '
> lib/mbsalign.c
> login-utils/su-common.c
> sys-utils/hwclock-cmos.c
> sys-utils/hwclock.c
> sys-utils/nsenter.c
> tests/ts/login/logindefs
> 
> And question about bool is asked before.
> 
> http://marc.info/?l=util-linux-ng&m=135817763904699&w=2

it's a little hard to tell if it was meant generally or that specific case.  
but if Karel prefers they not be used, then the codebase should reflect that.

> The question was never answered, but if I should guess the idea in
> util-linux is same as what Linus said should be done in kernel.
> 
> https://lkml.org/lkml/2013/8/31/138
> 
> Please read the whole thread. It's full of good stuff.

i'm not really seeing anything applicable to us.
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


[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