Subject: Re: [PATCH v2] Caps in not always shift

From: Thomas Huth <[email-masked]>
Date: Thu, 9 Jul 2015 08:00:48 +0200

Hi!

Please CC to [email-masked] now that we've finally got a SLOF
mailing list :-) !

On Wed,  8 Jul 2015 18:47:44 +0200
Dinar valeev <[email-masked]> 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