lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9c26ca9bf75d494ea966059d9bcbc2b5@AcuMS.aculab.com>
Date:   Wed, 19 Jan 2022 16:38:26 +0000
From:   David Laight <David.Laight@...LAB.COM>
To:     David Laight <David.Laight@...LAB.COM>,
        'Steven Rostedt' <rostedt@...dmis.org>,
        Andy Shevchenko <andy.shevchenko@...il.com>
CC:     Lucas De Marchi <lucas.demarchi@...el.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "intel-gfx@...ts.freedesktop.org" <intel-gfx@...ts.freedesktop.org>,
        "dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
        "amd-gfx@...ts.freedesktop.org" <amd-gfx@...ts.freedesktop.org>,
        "linux-security-module@...r.kernel.org" 
        <linux-security-module@...r.kernel.org>,
        "nouveau@...ts.freedesktop.org" <nouveau@...ts.freedesktop.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        Alex Deucher <alexander.deucher@....com>,
        "Andrew Morton" <akpm@...ux-foundation.org>,
        Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
        Ben Skeggs <bskeggs@...hat.com>,
        Christian König <christian.koenig@....com>,
        Chris Wilson <chris@...is-wilson.co.uk>,
        Daniel Vetter <daniel@...ll.ch>,
        David Airlie <airlied@...ux.ie>,
        "David S . Miller" <davem@...emloft.net>,
        Emma Anholt <emma@...olt.net>, Eryk Brol <eryk.brol@....com>,
        Francis Laniel <laniel_francis@...vacyrequired.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Harry Wentland <harry.wentland@....com>,
        "Jakub Kicinski" <kuba@...nel.org>,
        Jani Nikula <jani.nikula@...ux.intel.com>,
        "Joonas Lahtinen" <joonas.lahtinen@...ux.intel.com>,
        Julia Lawall <julia.lawall@...6.fr>,
        Kentaro Takeda <takedakn@...data.co.jp>,
        Leo Li <sunpeng.li@....com>,
        Mikita Lipski <mikita.lipski@....com>,
        Petr Mladek <pmladek@...e.com>,
        Rahul Lakkireddy <rahul.lakkireddy@...lsio.com>,
        "Raju Rangoju" <rajur@...lsio.com>,
        Rasmus Villemoes <linux@...musvillemoes.dk>,
        Rodrigo Vivi <rodrigo.vivi@...el.com>,
        Sakari Ailus <sakari.ailus@...ux.intel.com>,
        Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
        Vishal Kulkarni <vishal@...lsio.com>
Subject: RE: [PATCH 1/3] lib/string_helpers: Consolidate yesno()
 implementation

> > > > +static inline const char *yesno(bool v) { return v ? "yes" : "no"; }
> 
> 	return "yes\0no" + v * 4;
> 
> :-)

except '"no\0\0yes" + v * 4' works a bit better.

-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ