[PATCH v2] Caps in not always shift
Thomas Huth
thuth at redhat.com
Thu Jul 9 16:00:48 AEST 2015
Hi!
Please CC to slof at lists.ozlabs.org now that we've finally got a SLOF
mailing list :-) !
On Wed, 8 Jul 2015 18:47:44 +0200
Dinar valeev <k0da at opensuse.org> wrote:
...
> /**
> + * Checks if keypos is a latin key
> + * @param keypos
> + * @return -
> + */
> +void check_latin(uint8_t keypos)
> + if (keypos > KEYP_LATIN_A || keypos < KEYP_LATIN_Z) {
> + return true;
> + } else {
> + return false;
> + }
> +
That does not look like valid C to me ... "void" return type and
returning true or false ... and what about the outermost curly braces?
Anyway, you could even write this much more simple without if-statement
instead:
bool check_latin(uint8_t keypos)
{
return keypos > KEYP_LATIN_A || keypos < KEYP_LATIN_Z;
}
Thomas
More information about the Linuxppc-dev
mailing list