[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/8] Avoid hashing garbage for short keynames.
From: |
Diego Nieto Cid |
Subject: |
Re: [PATCH 2/8] Avoid hashing garbage for short keynames. |
Date: |
Wed, 11 Aug 2010 19:04:17 -0300 |
Hi,
2010/8/9 <olafBuddenhagen@gmx.net>:
>
> Hm, why tmp[5]? The way I read the code, only 4 entries are used...
>
Well it's the null that terminates the string. But as this isn't used
as a string it probably does not make much sense.
> BTW, minor stylistic nitpick: I generally consider it clearer and more
> robust to use sizeof in strncpy(), i.e.:
>
> strncpy(tmp, keyname, sizeof tmp)
>
> But that's only matter of style -- so if you prefer your variant,
> feel free to keep it like that :-)
>
It's alway good to remove hardcoded constants. :)
- Re: [PATCH 1/8] Update the parser to work, (continued)
- Re: [PATCH 1/8] Update the parser to work, Diego Nieto Cid, 2010/08/11
- [PATCH 1/5] Add type to $$ in mid-rules., Diego Nieto Cid, 2010/08/11
- [PATCH 2/5] Lexer support for keycodes with +/- symbols and arbitrary level numbers., Diego Nieto Cid, 2010/08/11
- [PATCH 3/5] Skip to main file's default section when needed., Diego Nieto Cid, 2010/08/11
- [PATCH 4/5] Update key type assigment routine., Diego Nieto Cid, 2010/08/11
- [PATCH 5/5] Recreate xkb/keymap/hurd from xkeyboard-config-1.8's xfree86 keymap., Diego Nieto Cid, 2010/08/11
[PATCH 4/8] Remove glue code and use mig to regenerate it., Diego Nieto Cid, 2010/08/04
[PATCH 3/8] Rule vmod returns an int with the vmod's bit on., Diego Nieto Cid, 2010/08/04
[PATCH 2/8] Avoid hashing garbage for short keynames., Diego Nieto Cid, 2010/08/04
[PATCH 5/8] Update code borrowed from console-client., Diego Nieto Cid, 2010/08/04
[PATCH 6/8] Add missing functions to input_driver_test., Diego Nieto Cid, 2010/08/04
[PATCH 7/8] Argument's default values are set independently., Diego Nieto Cid, 2010/08/04
[PATCH 8/8] Use vfprintf in debug_printf and write to stderr., Diego Nieto Cid, 2010/08/04