mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
xkb: maprules: use static struct init instead of memset()
Allow the compiler to figure out the most efficient way to do the struct initialization, and a little improvement on code readability. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1840>
This commit is contained in:
committed by
Marge Bot
parent
ffd7ca8af2
commit
a88b17565b
@@ -376,7 +376,6 @@ CheckLine(InputLine * line,
|
||||
{
|
||||
char *str, *tok;
|
||||
register int nread;
|
||||
FileSpec tmp;
|
||||
_Xstrtokparams strtok_buf;
|
||||
Bool append = FALSE;
|
||||
|
||||
@@ -419,7 +418,9 @@ CheckLine(InputLine * line,
|
||||
DebugF("Illegal line of data ignored\n");
|
||||
return FALSE;
|
||||
}
|
||||
memset((char *) &tmp, 0, sizeof(FileSpec));
|
||||
|
||||
FileSpec tmp = { 0 };
|
||||
|
||||
str = line->line;
|
||||
for (nread = 0; (tok = _XStrtok(str, " ", strtok_buf)) != NULL; nread++) {
|
||||
str = NULL;
|
||||
|
||||
Reference in New Issue
Block a user