public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat•com>
To: Dinar valeev <k0da@opensuse•org>
Cc: linuxppc-dev@ozlabs•org, aik@ozlabs•ru,
	nikunj@linux•vnet.ibm.com, Dinar Valeev <dvaleev@suse•com>,
	slof@lists•ozlabs.org
Subject: Re: [PATCH v2] Caps in not always shift
Date: Thu, 9 Jul 2015 08:00:48 +0200	[thread overview]
Message-ID: <20150709080048.1fda0d0f@thh440s> (raw)
In-Reply-To: <1436374064-4116-1-git-send-email-k0da@opensuse.org>


 Hi!

Please CC to slof@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@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

  reply	other threads:[~2015-07-09  6:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-08 16:47 [PATCH v2] Caps in not always shift Dinar valeev
2015-07-09  6:00 ` Thomas Huth [this message]
2015-07-09 12:59   ` Segher Boessenkool
2015-07-10  6:42 ` Paul Mackerras
2015-07-13 10:11   ` Dinar Valeev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150709080048.1fda0d0f@thh440s \
    --to=thuth@redhat$(echo .)com \
    --cc=aik@ozlabs$(echo .)ru \
    --cc=dvaleev@suse$(echo .)com \
    --cc=k0da@opensuse$(echo .)org \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    --cc=nikunj@linux$(echo .)vnet.ibm.com \
    --cc=slof@lists$(echo .)ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox