RE: [PATCH 1/3] lib/string_helpers: Consolidate yesno() implementation

From: David Laight
Date: Wed Jan 19 2022 - 11:37:07 EST


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

return "yes\0no" + v * 4;

:-)

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