[PATCH xserver] xkb: small clarification

Eric Engestrom eric.engestrom at imgtec.com
Wed Nov 8 09:46:17 UTC 2017


On Tuesday, 2017-11-07 18:37:11 +0100, Giuseppe Bilotta wrote:
> ---
>  xkb/xkbUtils.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> On Tue, Nov 7, 2017 at 10:55 AM, Eric Engestrom <eric at engestrom.ch> wrote:
> 
> > I think this patch is good, because it explicitly shows the NoSymbol
> > value that is tested later on. The implicit 0s are fine, but I think adding
> > a one-sentence explanation to the commit message would be good.
> 
> Oops, looks like it was pushed already.
> 
> Not sure if it's worth it anymore, but here's a one-line clarification comment
> in-code, just in case.

Meh, I wouldn't bother. Thanks though :)

> 
> -- 
> Giuseppe "Oblomov" Bilotta
> 
> diff --git a/xkb/xkbUtils.c b/xkb/xkbUtils.c
> index 8975ade8d..023902be5 100644
> --- a/xkb/xkbUtils.c
> +++ b/xkb/xkbUtils.c
> @@ -222,7 +222,9 @@ XkbUpdateKeyTypesFromCore(DeviceIntPtr pXDev,
>      XkbDescPtr xkb;
>      unsigned key, nG, explicit;
>      int types[XkbNumKbdGroups];
> -    KeySym tsyms[XkbMaxSymsPerKey] = {NoSymbol}, *syms;
> +    /* Initialize tsym with NoSymbol, which conveniently has value 0 */
> +    KeySym tsyms[XkbMaxSymsPerKey] = { NoSymbol };
> +    KeySym *syms;
>      XkbMapChangesPtr mc;
>  
>      xkb = pXDev->key->xkbInfo->desc;
> -- 
> 2.14.1.439.g647b9b4702
> 


More information about the xorg-devel mailing list